cleanfb 0.1.3.1 → 0.1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d1cbbcc8147000eb9cc41f38a7e2df09965b292
4
- data.tar.gz: bd0fe3199802a55ecd6f7f1036e68891ca9e60b6
3
+ metadata.gz: a3d72ea83b4530f3eb7a690ce2af5712a51d725b
4
+ data.tar.gz: fb5047ef72adef1669ccbb531eefea2714bd7e52
5
5
  SHA512:
6
- metadata.gz: 4133aab18b93e11211b6cc7d83a405422e32369fe9eb81e914e66a37cb4f000b729a5d26c7008e7ce3860da14c706a0644cb312db6201548c1de123cf424d733
7
- data.tar.gz: 0cf070f913a6a62777a0cc52b8f5cdf1b3330df99736da2011c208b2e7993660731dc1ce3afdc6c3aaceaef5fb275d49d38df5f0ee5685c5fc39fbccc48ddd2b
6
+ metadata.gz: 51b3413b527d4807ae8534115b529e54a022136048261b460b500fb983dcd426c09f0fe226a724a1d9c76dd7fbe1877087ff7f20deba095d0db25731f3d39754
7
+ data.tar.gz: 57aba1c62286434f42fdc5fad19f05649308944fb82b8f2d242980a230eecb0ce60384168c608f8ef48575e56bee32035957b99b2b9dfefe0c1b799d23a1a4f5
@@ -1,3 +1,3 @@
1
1
  module Cleanfb
2
- VERSION = "0.1.3.1"
2
+ VERSION = "0.1.3.2"
3
3
  end
data/lib/cleanfb.rb CHANGED
@@ -64,11 +64,18 @@ module Cleanfb
64
64
  path = "/opt/puppetlabs/puppet/cache/bucket"
65
65
  sum = line.split(" ")[0]
66
66
  start = (sum.scan /\w/).join("/")
67
+
68
+ name = line.split(" ")[3]
69
+
70
+ unless Dir.exist? "/root/saved_config/"
71
+ Dir.mkdir(File.join(Dir.root, "saved_config"), 0700)
72
+ end
67
73
 
68
74
  path += "/" + start[0..15] + sum + "/"
69
- puts "Removing " + path
75
+ puts "Storing " + path
76
+ puts "at /root/saved_config/#{name}"
70
77
  #cmd = `rm -rf #{path}`
71
- cmd = `mv -f #{path}contents /root/saved_config/#{path}`
78
+ cmd = `mv -f #{path}contents /root/saved_config/#{name}`
72
79
  end
73
80
  else
74
81
  puts "No file #{arg} found."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cleanfb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.1
4
+ version: 0.1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - lhoffl