Changed all test command in kvmsetup.sh to use single brackets
This commit is contained in:
parent
165d69a1e7
commit
765c431f0e
10
kvmsetup.sh
10
kvmsetup.sh
|
|
@ -62,15 +62,13 @@ if [ -f "$HOME/.zshrc" ]; then
|
|||
ZPROFILE="$HOME/.zshrc"
|
||||
fi
|
||||
|
||||
echo ">>$ZPROFILE"
|
||||
|
||||
SOURCE_STR="[ -s \"$KRE_USER_HOME/kvm/kvm.sh\" ] && . \"$KRE_USER_HOME/kvm/kvm.sh\" # this loads kvm"
|
||||
|
||||
if [[ -z "$PROFILE" && -z "$ZPROFILE" ]] || [[ ! -f "$PROFILE" && ! -f "$ZPROFILE" ]] ; then
|
||||
if [ -z "$PROFILE" && -z "$ZPROFILE" ] || [ ! -f "$PROFILE" && ! -f "$ZPROFILE" ] ; then
|
||||
if [ -z "$PROFILE" ]; then
|
||||
echo "=> Profile not found. Tried ~/.bash_profile ~/.zshrc and ~/.profile."
|
||||
echo "=> Create one of them and run this script again"
|
||||
elif [[ ! -f "$PROFILE" ]]; then
|
||||
elif [ ! -f "$PROFILE" ]; then
|
||||
echo "=> Profile $PROFILE not found"
|
||||
echo "=> Create it (touch $PROFILE) and run this script again"
|
||||
else
|
||||
|
|
@ -83,8 +81,8 @@ if [[ -z "$PROFILE" && -z "$ZPROFILE" ]] || [[ ! -f "$PROFILE" && ! -f "$ZPROFIL
|
|||
echo " $SOURCE_STR"
|
||||
echo
|
||||
else
|
||||
[[ -n "$PROFILE" ]] && _kvmsetup_update_profile "$PROFILE" "$SOURCE_STR"
|
||||
[[ -n "$ZPROFILE" ]] && _kvmsetup_update_profile "$ZPROFILE" "$SOURCE_STR"
|
||||
[ -n "$PROFILE" ] && _kvmsetup_update_profile "$PROFILE" "$SOURCE_STR"
|
||||
[ -n "$ZPROFILE" ] && _kvmsetup_update_profile "$ZPROFILE" "$SOURCE_STR"
|
||||
fi
|
||||
|
||||
echo "=> Type 'source $KRE_USER_HOME/kvm/kvm.sh' to start using kvm"
|
||||
|
|
|
|||
Loading…
Reference in New Issue