Can now delete jar groups.

This commit is contained in:
Marcus Whybrow 2012-05-21 14:39:59 +01:00
parent 094bcd45ad
commit d7d7b31b06

17
msm
View File

@ -131,8 +131,7 @@ manager_jars_remote_create() {
}
manager_jars_remote_getlatest() {
if is_valid_name "$1"; then
if [[ -e $JAR_STORAGE_PATH/$1 ]]; then
if is_valid_name "$1" && [[ -e $JAR_STORAGE_PATH/$1 ]]; then
if [[ -e $JAR_STORAGE_PATH/$1/$JAR_REMOTE_TARGET ]]; then
printf "Downloading latest version... "
@ -191,6 +190,19 @@ manager_jars_remote_getlatest() {
else
echo "No remote with that name."
fi
}
manager_jars_remote_delete() {
if is_valid_name "$1" && [[ -e $JAR_STORAGE_PATH/$1 ]]; then
printf "Are you sure you want to delete this jar group [y/N]: "
read answer
if [[ $answer =~ ^y|Y|yes$ ]]; then
as_user "rm -r $JAR_STORAGE_PATH/$1"
echo "Jar group was deleted."
else
echo "Jar group was NOT deleted."
fi
else
echo "No remote with that name."
fi
@ -228,6 +240,7 @@ case "$1" in
manager_jars_remote_create $4 $5
;;
delete)
manager_jars_remote_delete $4
;;
rename)
;;