Browse Source

remove-unused-sources: Include peak files in deletion and size calculation.

tags/non-daw-v1.1.0
Jonathan Moore Liles 16 years ago
parent
commit
a701d53265
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      remove-unused-sources

+ 4
- 2
remove-unused-sources View File

@@ -59,10 +59,12 @@ remove_sources ()
local TOTAL=0 local TOTAL=0
local FILE local FILE
local SIZE local SIZE
local PSIZE
while read FILE while read FILE
do do


SIZE=`stat -c '%s' "${FILE}" 2>/dev/null` SIZE=`stat -c '%s' "${FILE}" 2>/dev/null`
PSIZE=`stat -c '%s' "${FILE}.peak" 2>/dev/null`


if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
@@ -73,10 +75,10 @@ remove_sources ()
echo "Would remove: ${FILE}" echo "Would remove: ${FILE}"
else else
echo "Removing unused source \"${FILE}\"..." echo "Removing unused source \"${FILE}\"..."
rm -f ./"${FILE}" ./"${FILE}-"*.peak
rm -f ./"${FILE}" ./"${FILE}".peak
fi fi


TOTAL=$(( $TOTAL + $SIZE ))
TOTAL=$(( $TOTAL + $SIZE + $PSIZE ))
fi fi


done done


Loading…
Cancel
Save