diff options
author | Tom Willemse | 2019-01-24 01:22:12 -0800 |
---|---|---|
committer | Tom Willemse | 2019-01-24 01:22:12 -0800 |
commit | b214a5431cd5c0fe2fd6e5fc1d9628b79a67470e (patch) | |
tree | 713f25b64d222041697294d0f186e64cf8898019 /util/usr/bin/merge-pacnews | |
parent | f6aed5ca571b22ca3fafa55cddb416f78610df28 (diff) | |
download | new-dotfiles-b214a5431cd5c0fe2fd6e5fc1d9628b79a67470e.tar.gz new-dotfiles-b214a5431cd5c0fe2fd6e5fc1d9628b79a67470e.zip |
Run shfmt on merge-pacnews
Diffstat (limited to 'util/usr/bin/merge-pacnews')
-rwxr-xr-x | util/usr/bin/merge-pacnews | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/util/usr/bin/merge-pacnews b/util/usr/bin/merge-pacnews index d9f0e85..019f446 100755 --- a/util/usr/bin/merge-pacnews +++ b/util/usr/bin/merge-pacnews @@ -2,18 +2,17 @@ files=$(find /etc -type f -name '*.pacnew') -for pacnew in $files -do +for pacnew in $files; do unprefixed=${pacnew%.pacnew} - if [[ ! -e "$unprefixed" ]]; then continue; fi + if [[ ! -e $unprefixed ]]; then continue; fi emacs -eval "(emerge-files nil \"$unprefixed\" \"$pacnew\" \"$unprefixed\")" otime=$(stat -c %Y "$unprefixed") ntime=$(stat -c %Y "$pacnew") - if [[ "$otime" -gt "$ntime" ]]; then + if [[ $otime -gt $ntime ]]; then rm -v "$pacnew" else echo "Skipping removal of $pacnew" |