From 3458b2b445d6e76887aa76f085857da6336e3af7 Mon Sep 17 00:00:00 2001 From: Phil Olynyk Date: Thu, 17 Feb 2022 22:32:27 -0500 Subject: [PATCH] Make sure clean-rm doesn't delete the new files --- Building/Linux/clean_rm-common-NN.old | 16 ++++++++++++++++ Building/Linux/clean_rm-common-NN.sh | 9 ++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100755 Building/Linux/clean_rm-common-NN.old diff --git a/Building/Linux/clean_rm-common-NN.old b/Building/Linux/clean_rm-common-NN.old new file mode 100755 index 00000000..7bde25e2 --- /dev/null +++ b/Building/Linux/clean_rm-common-NN.old @@ -0,0 +1,16 @@ + +# begin common script shell +# delete all the folder not deleted by the purge command + +echo "appli_name=${appli_name}" + +list=$(find /usr -name ${appli_name} 2>/dev/null) + +for folder in $list +do + echo "to delete : '$folder'" + rm -r $folder +done + +# end common script shell + diff --git a/Building/Linux/clean_rm-common-NN.sh b/Building/Linux/clean_rm-common-NN.sh index 7bde25e2..f9413371 100755 --- a/Building/Linux/clean_rm-common-NN.sh +++ b/Building/Linux/clean_rm-common-NN.sh @@ -4,12 +4,15 @@ echo "appli_name=${appli_name}" -list=$(find /usr -name ${appli_name} 2>/dev/null) +list=$(find /usr/share -name ${appli_name} 2>/dev/null) for folder in $list do - echo "to delete : '$folder'" - rm -r $folder + if [ $folder != '/usr/share/OSCAR' ] + then + echo "to delete : '$folder'" + rm -r $folder + fi done # end common script shell