19 lines
491 B
Bash
Executable File
19 lines
491 B
Bash
Executable File
#!/bin/sh
|
|
stats() {
|
|
stat --format '%n %A size %sB, birth: %.10w mod %.10y' "$@"
|
|
}
|
|
if test "$#" -gt 0
|
|
then
|
|
orig="$(st-unarchive "$1")"
|
|
( stats "$orig" "$1"; dif "$orig" "$@" ) |
|
|
less --RAW-CONTROL-CHARS --quit-on-intr --quit-if-one-screen
|
|
test "$?" -eq "2" && exit 1
|
|
echo "y|r to restore, n|d to delete"
|
|
read reply
|
|
case "$reply" in
|
|
(y|r) st-restore "$1";;
|
|
(n|d) rm -v "$1";;
|
|
esac
|
|
else find -name '*sync-conflict*' -exec st-diff '{}' \;
|
|
fi
|