cleanfb 0.1.3.3.7 → 0.1.3.4

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: 9c0a9bbc43cf7ff4c7f10874fe2f752779f9ec11
4
- data.tar.gz: 53b32466814b4d0b8c51c35a82f24c1e1eee6568
3
+ metadata.gz: 7fa7bbead07de243318bcbd7515548250487c6fd
4
+ data.tar.gz: 2d9a7ccef464ce29ea5df5d548ae1c9182e5b58a
5
5
  SHA512:
6
- metadata.gz: 734ec28ce009a3e925979cabf99e46c730c6b4361ae7082b1dc0c5ed37e869b378d522f2287e5b44a89026eff200fbd0351c95c2f4053017e1cc2afaf1ac378c
7
- data.tar.gz: 4515643bcf5de2a356183139ed69335a1ed61a25e1e72c41b58e5f55b9bab5e565cffbb7c76f59ed1210ce4242612c6f6aa897b5f25ec08b4f16383cf3c437df
6
+ metadata.gz: 7e7dbd8b7f32588087c9439896d9f7159f7334d816e431a9981986258b62130bdfe252f23e5b1bc9b5f1ae52f6203419bd92f7006dcb6d5566955c9fe6335817
7
+ data.tar.gz: a8d6f9f022e72e42eb29fdce152c1bdbce524122fc6a43bb05aa0f43423d58c98438f51480e66477afa3915bf79135840113f6194ed53fe36d88fcf781882cd8
@@ -1,3 +1,3 @@
1
1
  module Cleanfb
2
- VERSION = "0.1.3.3.7"
2
+ VERSION = "0.1.3.4"
3
3
  end
data/lib/cleanfb.rb CHANGED
@@ -66,16 +66,21 @@ module Cleanfb
66
66
  start = (sum.scan /\w/).join("/")
67
67
 
68
68
  name = line.split(" ")[3].split("/").last
69
+ date = line.split(" ")[1]
70
+ time = line.split(" ")[2]
69
71
 
70
- unless Dir.exist? "/root/saved_config/"
71
- Dir.mkdir(File.join(Dir.home("root"), "saved_config"), 0700)
72
+ unless Dir.exist? "/root/saved_configs/"
73
+ Dir.mkdir(File.join(Dir.home("root"), "saved_configs"), 0700)
74
+ end
75
+
76
+ unless Dir.exist? "/root/saved_configs/#{name}/"
77
+ Dir.mkdir(File.join("/root/saved_configs/", "#{name}"), 0700)
72
78
  end
73
79
 
74
80
  path += "/" + start[0..15] + sum + "/"
75
81
  puts "Storing " + path
76
- puts "at /root/saved_config/#{name}"
77
- #cmd = `rm -rf #{path}`
78
- cmd = `mv -f #{path}contents /root/saved_config/#{name}`
82
+ puts "at /root/saved_configs/#{date}_#{time}_#{name}"
83
+ cmd = `mv -f #{path}contents /root/saved_configs/#{date}_#{time}_#{name}`
79
84
  end
80
85
  else
81
86
  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.3.7
4
+ version: 0.1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - lhoffl