Run shfmt on merge-pacnews
This commit is contained in:
parent
f6aed5ca57
commit
b214a5431c
1 changed files with 3 additions and 4 deletions
|
@ -2,18 +2,17 @@
|
||||||
|
|
||||||
files=$(find /etc -type f -name '*.pacnew')
|
files=$(find /etc -type f -name '*.pacnew')
|
||||||
|
|
||||||
for pacnew in $files
|
for pacnew in $files; do
|
||||||
do
|
|
||||||
unprefixed=${pacnew%.pacnew}
|
unprefixed=${pacnew%.pacnew}
|
||||||
|
|
||||||
if [[ ! -e "$unprefixed" ]]; then continue; fi
|
if [[ ! -e $unprefixed ]]; then continue; fi
|
||||||
|
|
||||||
emacs -eval "(emerge-files nil \"$unprefixed\" \"$pacnew\" \"$unprefixed\")"
|
emacs -eval "(emerge-files nil \"$unprefixed\" \"$pacnew\" \"$unprefixed\")"
|
||||||
|
|
||||||
otime=$(stat -c %Y "$unprefixed")
|
otime=$(stat -c %Y "$unprefixed")
|
||||||
ntime=$(stat -c %Y "$pacnew")
|
ntime=$(stat -c %Y "$pacnew")
|
||||||
|
|
||||||
if [[ "$otime" -gt "$ntime" ]]; then
|
if [[ $otime -gt $ntime ]]; then
|
||||||
rm -v "$pacnew"
|
rm -v "$pacnew"
|
||||||
else
|
else
|
||||||
echo "Skipping removal of $pacnew"
|
echo "Skipping removal of $pacnew"
|
||||||
|
|
Loading…
Reference in a new issue