remaster/src/func/workspace_erase

20 lines
336 B
Plaintext
Raw Normal View History

#!/bin/bash
#remaster lib
2018-05-07 00:56:46 +00:00
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#workspace_erase [workspace_path]
function workspace_erase() {
echo -n "erase workspace ... "
for dir in "$@"; do
[ -d "$dir" ] && rm -r -f "$dir"
done
echo "done"
}
2018-05-10 15:13:19 +00:00
2018-05-10 22:04:02 +00:00
#this func is standalone executable
2018-05-10 15:13:19 +00:00
[ -n "$1" ] && {
2018-05-10 22:04:02 +00:00
workspace_erase $@
2018-05-10 15:13:19 +00:00
}