mirror of
https://github.com/notwa/rc
synced 2024-10-18 04:21:25 -07:00
move inner loop out of outer loop
This commit is contained in:
parent
2765054c9f
commit
8f5934e864
1 changed files with 24 additions and 24 deletions
12
update
12
update
|
@ -137,13 +137,14 @@ for d in home sh vim; do
|
||||||
discover "$d" > _new/hashes.txt ||
|
discover "$d" > _new/hashes.txt ||
|
||||||
die 'failed to find new files'
|
die 'failed to find new files'
|
||||||
|
|
||||||
different < _new/hashes.txt > _new/updates.txt ||
|
different < _new/hashes.txt >> _new/updates.txt ||
|
||||||
die 'failed to compare files'
|
die 'failed to compare files'
|
||||||
|
done
|
||||||
|
|
||||||
LC_ALL=C sort < _new/updates.txt > _new/sorted.txt ||
|
LC_ALL=C sort < _new/updates.txt > _new/sorted.txt ||
|
||||||
die 'failed to sort file paths'
|
die 'failed to sort file paths'
|
||||||
|
|
||||||
while read -r f; do
|
while read -r f; do
|
||||||
desire "$f" || continue
|
desire "$f" || continue
|
||||||
|
|
||||||
if [ -f "_new/$f" ] && ! [ -f "$f" ]; then
|
if [ -f "_new/$f" ] && ! [ -f "$f" ]; then
|
||||||
|
@ -161,7 +162,6 @@ for d in home sh vim; do
|
||||||
warn " / $f"
|
warn " / $f"
|
||||||
#else warn " = $f"
|
#else warn " = $f"
|
||||||
fi
|
fi
|
||||||
done < _new/sorted.txt
|
done < _new/sorted.txt
|
||||||
done
|
|
||||||
|
|
||||||
clean
|
clean
|
||||||
|
|
Loading…
Reference in a new issue