summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2008-07-02 19:53:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2008-07-02 19:53:23 +0000
commita74bb7dd0670414a8cfd7262038435d5f7209024 (patch)
tree3ef41d80e0893462e4e7231d6e8a21bff42ce3eb
parent3a0cbe42416acbcf080f172e1fd4265b4e42c2e8 (diff)
downloadalpine-conf-a74bb7dd0670414a8cfd7262038435d5f7209024.tar.bz2
alpine-conf-a74bb7dd0670414a8cfd7262038435d5f7209024.tar.xz
fix bug with filenames on backup files.
fix bug when there are no backups
-rw-r--r--Makefile2
-rw-r--r--lbu4
2 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0e0ae95..5da4e81 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-V=1.6
+V=1.6.1
P=alpine-conf
PV=$(P)-$(V)
APKF=$(PV).apk
diff --git a/lbu b/lbu
index 80f85c3..632608d 100644
--- a/lbu
+++ b/lbu
@@ -82,7 +82,7 @@ mount_once() {
# create backupfile
backup_apkovl() {
local outfile="$1"
- local d=$( date -u -r "$outfile" "+%Y%m%d%H%m%S" )
+ local d=$( date -u -r "$outfile" "+%Y%m%d%H%M%S" )
local backup=$(echo "$outfile" | sed "s/\.apkovl\.tar\.gz/.$d.tar.gz/")
vecho "Creating backup $backup"
if [ -z "$DRYRUN" ]; then
@@ -387,7 +387,7 @@ cmd_commit() {
# delete old backups if needed
# poor mans 'head -n -N' done with awk.
- ls "$mnt"/$(hostname).[0-9][0-9][0-9][0-9]*[0-9].tar.gz \
+ ls "$mnt"/$(hostname).[0-9][0-9][0-9][0-9]*[0-9].tar.gz 2>/dev/null \
| awk '{ a[++i] = $0; } END {
print a[0];
while (i-- > '"${BACKUP_LIMIT:-0}"') {