From 5525a65810adf8ac2626080341eca3254c41e7c4 Mon Sep 17 00:00:00 2001 From: hayao Date: Sun, 4 Oct 2020 11:44:23 +0900 Subject: [PATCH] [update] : Added only work --- tools/clean.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/clean.sh b/tools/clean.sh index d57d14e5..2743313b 100755 --- a/tools/clean.sh +++ b/tools/clean.sh @@ -3,6 +3,7 @@ script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && cd .. && pwd )" work_dir="${script_path}/work" debug=false +only_work=false # Show an INFO message # $1: message string @@ -94,6 +95,7 @@ _help() { echo echo " General options:" echo " -d Show debug message" + echo " -o Remove only work dir" echo " -w [dir] Specify the work dir" echo " -h This help message" } @@ -101,6 +103,7 @@ _help() { while getopts "dw:h" arg; do case ${arg} in d) debug=true ;; + o) only_work=true ;; w) work_dir="${OPTARG}" ;; h) _help @@ -118,10 +121,11 @@ shift $((OPTIND - 1)) msg_debug "ほげえ" umount_chroot -remove "${script_path}/menuconfig/build/"** -remove "${script_path}/system/cpp-src/mkalteriso/build"/** -remove "${script_path}/menuconfig-script/kernel_choice" +if [[ "${only_work}" = false ]]; then + remove "${script_path}/menuconfig/build/"** + remove "${script_path}/system/cpp-src/mkalteriso/build"/** + remove "${script_path}/menuconfig-script/kernel_choice" + remove "${script_path}/system/mkalteriso" +fi remove "${work_dir%/}"/** remove "${work_dir}" -remove "${script_path}/system/mkalteriso" - -- 2.11.0