cleanfb 0.1.3.5 → 0.1.3.6

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: 04098e6c261464b7035a7f8ef9b40ed661486011
4
- data.tar.gz: f4c681b965b6fe8e56147987fe804a701a8f8626
3
+ metadata.gz: e051b8d78b3f64e33d44dfaf4ef6d83ddfff892e
4
+ data.tar.gz: e0ee9d2e75c54c351cd77d6967175aeff5b87f76
5
5
  SHA512:
6
- metadata.gz: 5b7656716fd08adcc991088e70e0c3d70ddba9ebc23118073d68744b2960b3be41f89439588497b205bb5b92898e92f42ab3dd753234217bc8bc2be996efa322
7
- data.tar.gz: 121758421db530d29d4f963dfcc1cc8269a7e9b6c2e52e93f47cf4e45abfc31d788135915c22db3ab8b64d45f6b60dd2aad621a1acf9f732fbdfc2a53998f475
6
+ metadata.gz: 3b4b6f762b0a11118c97fa70e9ef345312c306218f852d920913c2c70b268a95c46b945c3ae66b0a2f483d4254292bfbaab04e19dde8ba9183cc55221a827010
7
+ data.tar.gz: 033d6579228dc0b01f35f69a8597c52d78ba4be949c2683190c0e561090abe3de174356b36c7ee58c9331bf065cb61e78ce8a32add1c33d89123b78a45b3e330
@@ -1,3 +1,3 @@
1
1
  module Cleanfb
2
- VERSION = "0.1.3.5"
2
+ VERSION = "0.1.3.6"
3
3
  end
data/lib/cleanfb.rb CHANGED
@@ -69,18 +69,24 @@ module Cleanfb
69
69
  date = line.split(" ")[1]
70
70
  time = line.split(" ")[2]
71
71
 
72
- unless Dir.exist? "/root/saved_configs/"
72
+ save_dir = "/root/saved_configs/"
73
+
74
+ unless Dir.exist? save_dir
73
75
  Dir.mkdir(File.join(Dir.home("root"), "saved_configs"), 0700)
74
76
  end
75
77
 
76
- unless Dir.exist? "/root/saved_configs/#{name}/"
77
- Dir.mkdir(File.join("/root/saved_configs/", "#{name}"), 0700)
78
+ unless Dir.exist? "#{save_dir}/#{name}/"
79
+ Dir.mkdir(File.join("#{save_dir}", "#{name}"), 0700)
80
+ end
81
+
82
+ if File.exist? "#{path}/contents"
83
+ path += "/" + start[0..15] + sum + "/"
84
+ puts "Storing " + path
85
+ puts "at /root/saved_configs/#{date}_#{time}_#{name}"
86
+ cmd = `mv -f #{path}contents /root/saved_configs/#{name}/#{date}_#{time}_#{name}`
87
+ else
88
+ puts "No file #{arg} found."
78
89
  end
79
-
80
- path += "/" + start[0..15] + sum + "/"
81
- puts "Storing " + path
82
- puts "at /root/saved_configs/#{date}_#{time}_#{name}"
83
- cmd = `mv -f #{path}contents /root/saved_configs/#{name}/#{date}_#{time}_#{name}`
84
90
  end
85
91
  else
86
92
  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.5
4
+ version: 0.1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - lhoffl