mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
- Remove unecessary $(cat) - switch * to ./* to avoid entries with dashes to be treated as options - replace $* with "$@" - repeating change path serial calls - unecessary if change path is called one (get script)
19 lines
449 B
Bash
Executable File
19 lines
449 B
Bash
Executable File
#!/usr/bin/env bash
|
|
. "$GVM_ROOT/scripts/functions"
|
|
|
|
[[ $1 != "" ]] ||
|
|
display_fatal "Please specifiy the name"
|
|
|
|
[[ -f $GVM_ROOT/environments/$1 ]] ||
|
|
display_fatal "Alias doesn't exist!"
|
|
|
|
$GREP_PATH "gvm_alias_name" "$GVM_ROOT/environments/$1" > /dev/null ||
|
|
display_fatal "$1 is not an alias!"
|
|
|
|
rm -rf "$GVM_ROOT/environments/$1" ||
|
|
display_fatal "Could not delete alias"
|
|
|
|
rm -rf "$GVM_ROOT/gos/$1" ||
|
|
display_fatal "Could not delete alias"
|
|
|