diff options
| author | onefang | 2019-12-12 13:49:13 +1000 |
|---|---|---|
| committer | onefang | 2019-12-12 13:49:13 +1000 |
| commit | ae73c9481ac6d2cb36aaeafdb2beb1a4709f5d2c (patch) | |
| tree | aa762c57e8e6edcdc30dddb8348203b313b7698e | |
| parent | Whitespace-- (diff) | |
| download | apt-panopticon-ae73c9481ac6d2cb36aaeafdb2beb1a4709f5d2c.zip apt-panopticon-ae73c9481ac6d2cb36aaeafdb2beb1a4709f5d2c.tar.gz apt-panopticon-ae73c9481ac6d2cb36aaeafdb2beb1a4709f5d2c.tar.bz2 apt-panopticon-ae73c9481ac6d2cb36aaeafdb2beb1a4709f5d2c.tar.xz | |
Move the about to be replaced rrd directory deletion closer to the replacement code.
| -rwxr-xr-x | apt-panopticon-update-data.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-panopticon-update-data.lua b/apt-panopticon-update-data.lua index 461ae39..0371375 100755 --- a/apt-panopticon-update-data.lua +++ b/apt-panopticon-update-data.lua | |||
| @@ -8,7 +8,6 @@ local C = APT.C | |||
| 8 | local arg, sendArgs = APT.parseArgs({...}) | 8 | local arg, sendArgs = APT.parseArgs({...}) |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | os.execute('rm -fr rrd') | ||
| 12 | 11 | ||
| 13 | local files = io.popen('ls -1 results_*.tar.xz') | 12 | local files = io.popen('ls -1 results_*.tar.xz') |
| 14 | for l in files:lines() do | 13 | for l in files:lines() do |
| @@ -16,6 +15,7 @@ for l in files:lines() do | |||
| 16 | os.execute('tar -xf ' .. l) | 15 | os.execute('tar -xf ' .. l) |
| 17 | end | 16 | end |
| 18 | 17 | ||
| 18 | os.execute('rm -fr rrd') | ||
| 19 | local files = io.popen('ls -d1 results_*') | 19 | local files = io.popen('ls -d1 results_*') |
| 20 | for l in files:lines() do | 20 | for l in files:lines() do |
| 21 | if ('results_old' ~= l) and ('.tar.xz' ~= l:sub(25, -1)) then | 21 | if ('results_old' ~= l) and ('.tar.xz' ~= l:sub(25, -1)) then |
