From: Phillip Berndt Date: Sun, 20 Jul 2014 11:21:47 +0000 (+0200) Subject: Fixed integer test expressions X-Git-Tag: 1.0~130 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=b4e56eb70ab92c2936bb759c9319645ab55835fe Fixed integer test expressions --- diff --git a/autorandr b/autorandr index 9cb87f7..143a044 100755 --- a/autorandr +++ b/autorandr @@ -308,7 +308,7 @@ load() { local CONF="$PROFILES/$PROFILE/config" local IS_VIRTUAL_PROFILE=`echo "$RESERVED_PROFILE_NAMES" | grep -c "^ $PROFILE "` - if [ ! -f "$CONF" -a $IS_VIRTUAL_PROFILE == 0 ]; then + if [ ! -f "$CONF" -a $IS_VIRTUAL_PROFILE -eq 0 ]; then echo " -> Error: Profile '$PROFILE' does not exist." >&2 return fi @@ -322,7 +322,7 @@ load() { if [ -f "$CONF" ]; then echo " -> loading profile $PROFILE" - if [ $IS_VIRTUAL_PROFILE != 0 ]; then + if [ $IS_VIRTUAL_PROFILE -ne 0 ]; then echo " -> Warning: Existing profile overrides virtual profile with same name" >&2 fi $LOAD_METHOD "$CONF"