summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sstate-cache-management.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
index 34bde01970..ffda05ea3e 100755
--- a/scripts/sstate-cache-management.sh
+++ b/scripts/sstate-cache-management.sh
@@ -341,9 +341,9 @@ rm_by_stamps (){
341 echo "Done" 341 echo "Done"
342 342
343 # Total number of files including sstate-, .siginfo and .done files 343 # Total number of files including sstate-, .siginfo and .done files
344 total_files=`find $cache_dir -name 'sstate*' | wc -l` 344 total_files=`find $cache_dir -type f -name 'sstate*' | wc -l`
345 # Save all the state file list to a file 345 # Save all the state file list to a file
346 find $cache_dir -name 'sstate*.tgz' | sort -u -o $cache_list 346 find $cache_dir -type f -name 'sstate*' | sort -u -o $cache_list
347 347
348 echo "Figuring out the files which will be removed ... " 348 echo "Figuring out the files which will be removed ... "
349 for i in $all_sums; do 349 for i in $all_sums; do
@@ -355,14 +355,14 @@ rm_by_stamps (){
355 sort -u $keep_list -o $keep_list 355 sort -u $keep_list -o $keep_list
356 to_del=`comm -1 -3 $keep_list $cache_list` 356 to_del=`comm -1 -3 $keep_list $cache_list`
357 gen_rmlist $rm_list "$to_del" 357 gen_rmlist $rm_list "$to_del"
358 let total_deleted=`cat $rm_list | wc -w` 358 let total_deleted=`cat $rm_list | sort -u | wc -w`
359 if [ $total_deleted -gt 0 ]; then 359 if [ $total_deleted -gt 0 ]; then
360 [ $debug -gt 0 ] && cat $rm_list 360 [ $debug -gt 0 ] && cat $rm_list | sort -u
361 read_confirm 361 read_confirm
362 if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then 362 if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then
363 echo "Removing sstate cache files ... ($total_deleted files)" 363 echo "Removing sstate cache files ... ($total_deleted files)"
364 # Remove them one by one to avoid the argument list too long error 364 # Remove them one by one to avoid the argument list too long error
365 for i in `cat $rm_list`; do 365 for i in `cat $rm_list | sort -u`; do
366 rm -f $verbose $i 366 rm -f $verbose $i
367 done 367 done
368 echo "$total_deleted files have been removed" 368 echo "$total_deleted files have been removed"