diff options
author | Dave Reisner <d@falconindy.com> | 2010-08-26 15:02:04 -0400 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2010-08-26 15:11:04 -0400 |
commit | 09fcf1c88e6e8c5ebbefdafcb71c6e0e44477c44 (patch) | |
tree | d2c2d9ae1eeffb6a3657777b7a96dc87afd26436 | |
parent | d3c285025e6951075490c19afff618e5fd8f963f (diff) | |
download | squashfu-09fcf1c88e6e8c5ebbefdafcb71c6e0e44477c44.tar.gz |
simply find operation in action_restore
-rwxr-xr-x | squashfu | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -344,7 +344,7 @@ action_restore () { mount_squash || die "Failed to mount seed" - IFS=$'\n' read -r -d $'\0' -a results < <(find $BINS_DIR/*/${1%/*}/${1##*/} -maxdepth 0 2>/dev/null) + IFS=$'\n' read -r -d'\0' -a results < <(find "$BINS_DIR"/*/"$1" -maxdepth 0 2>/dev/null) declare -a snaps [[ -e "$SQUASH_MOUNT/$1" ]] && snaps[0]=$(stat -c %Z "$SQUASH_MOUNT/$1") @@ -354,7 +354,7 @@ action_restore () { die "Target not found: '$1'" fi - info "Found ${1##*/}in the following backups:" + info "Found ${1##*/} in the following backups:" [[ -n ${snaps[0]} ]] && printf " 0\t%s\n" "$(date --date=@${snaps[0]})" for result in "${results[@]}"; do local bin=$(sed -n "s|$BINS_DIR/\([0-9]*\)$1|\1|p" <<< "$result") |