common: backup_rename: Fixed getting multiple extensions

dehydrated
Felix Stupp 5 years ago
parent 10ef319008
commit fce052c32b
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -5,6 +5,6 @@ set -euxo pipefail;
dir="$(dirname "$1")"; dir="$(dirname "$1")";
date="$(date +%Y-%m-%d-%H-%M)"; date="$(date +%Y-%m-%d-%H-%M)";
name="$(basename "$1")"; name="$(basename "$1")";
ext="${name##*.}"; ext="${name##latest.}";
mv "$1" "$dir/$date.$ext"; mv "$1" "$dir/$date.$ext";

Loading…
Cancel
Save