Permalink
Browse files

work/do.sh: clean up patches automatically

  • Loading branch information...
1 parent 6ad1fb7 commit ff1e4cc1b3663dd3b1c596409802cbb29e53bed0 @gregkh committed Sep 26, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 work/do.sh
View
@@ -160,10 +160,16 @@ echo "BRANCH=$BRANCH"
# don't want to accidentally send them out twice
OLD_PATCH=`ls 0*.patch 2>/dev/null | head -n 1`
if [ "${OLD_PATCH}" != "" ] ; then
- echo "ERROR!!!"
- echo "There are old patches still in the directory,"
- echo "clean them up before running this again."
- exit
+ echo "WARNING: There are old patches still in the directory:"
+ for P in 0*.patch; do
+ echo " ${P}"
+ done
+ echo ""
+ echo "I will clean them up if you don't stop the script right now."
+ echo -n "[ret] to continue"
+ read
+ rm 0*.patch
+ #exit
fi
PWD=`pwd`

0 comments on commit ff1e4cc

Please sign in to comment.