scripts/lib: Fix a bug in the `remove` function
parent
9dd4489141
commit
eb8db35615
|
@ -59,16 +59,16 @@ fi
|
||||||
function remove {
|
function remove {
|
||||||
local USE_FORCE=""
|
local USE_FORCE=""
|
||||||
if [ "$1" = "-f" ]; then
|
if [ "$1" = "-f" ]; then
|
||||||
USE_FORCE="-f"
|
USE_FORCE="f"
|
||||||
|
shift
|
||||||
echo "Forcefully removing $1..."
|
echo "Forcefully removing $1..."
|
||||||
else
|
else
|
||||||
echo "Removing $1..."
|
echo "Removing $1..."
|
||||||
fi;
|
fi;
|
||||||
shift
|
|
||||||
if [ -d "$1" ]; then
|
if [ -d "$1" ]; then
|
||||||
rm "$USE_FORCE" -rv "$1"
|
rm -"$USE_FORCE"rv "$1"
|
||||||
else
|
else
|
||||||
rm "$USE_FORCE" -v "$1"
|
rm -"$USE_FORCE"v "$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue