cleanfb 0.1.4.6 → 0.1.4.7
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 +4 -4
- data/lib/cleanfb/version.rb +1 -1
- data/lib/cleanfb.rb +0 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 282b589e9e0c52f9ede61087c9dd0798ca13761d
|
4
|
+
data.tar.gz: ca40ea57bc3bd33d9d739cf968241cbc6205f388
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee48ed5397ef13e7e9416009b9cd81e6132d41facf00c01df26052c5dcc5e5142bf440acc5dc510a3eaad0273e3285904274984f62d3ff2797ad65ad9a10aa8b
|
7
|
+
data.tar.gz: 6a5b5cb1f774e25438f24877b5fb3bfec6ad6e1d4ccc74f94dbdfc165d1665ab41fa9897e609a43a546f5e5a0a455482b257c3c7e23c139a923741ec4c7dafa8
|
data/lib/cleanfb/version.rb
CHANGED
data/lib/cleanfb.rb
CHANGED
@@ -84,25 +84,11 @@ module Cleanfb
|
|
84
84
|
path += "/" + start[0..15] + sum + "/"
|
85
85
|
|
86
86
|
if File.exist? "#{path}/contents"
|
87
|
-
cur_sum = Digest::MD5.file "#{path}/contents"
|
88
|
-
flag = false
|
89
|
-
d = Dir.new("#{path}")
|
90
|
-
Dir.foreach("#{path}") do |file|
|
91
|
-
sum = Digest::MD5.file file
|
92
|
-
|
93
|
-
if sum == cur_sum
|
94
|
-
flag = true
|
95
|
-
end
|
96
|
-
end
|
97
87
|
|
98
|
-
unless flag
|
99
88
|
puts "Storing " + path
|
100
89
|
puts "at /root/saved_configs/#{name}/#{date}_#{time}_#{file}"
|
101
90
|
cmd = `mv -f #{path}contents /root/saved_configs/#{name}/#{date}_#{time}_#{file}`
|
102
91
|
cmd = `rm -rf #{path}`
|
103
|
-
else
|
104
|
-
puts "File is already stored"
|
105
|
-
end
|
106
92
|
else
|
107
93
|
puts "No file #{arg} found."
|
108
94
|
end
|