From 120f02fe0772a8df332d559ffa3d0fb30ff9b564 Mon Sep 17 00:00:00 2001 From: SendSpams <36188980+SendSpams@users.noreply.github.com> Date: Fri, 6 Apr 2018 07:02:00 +0100 Subject: [PATCH 1/3] Modified to work with missing HOME environment variable under Windows The HOME environment variable is not set on Windows by default. Instead Windows uses USERPROFILE. It is possible for HOME to be set on Windows but for users who have not done this they will get: `HOME: unbound variable`. I have added a line that sets HOME to USERPROFILE if HOME is missing and USERPROFILE is found. This solves the unbound variable error. --- AAXtoMP3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AAXtoMP3 b/AAXtoMP3 index e53b8de..6c9778b 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -6,7 +6,7 @@ codec=libmp3lame extension=mp3 mode=chaptered authcode=".authcode"; -authcodeDirs="${HOME}/ ./"; +if [ -z ${HOME+x} ] && ! [ -z ${USERPROFILE+x} ]; then HOME="$USERPROFILE"; fi GREP=$(grep --version | grep -q GNU && echo "grep" || echo "ggrep") if ! [[ $(type -P "$GREP") ]]; then From 1d1f738713fa3a9835bb77e9024b931c9d58eb39 Mon Sep 17 00:00:00 2001 From: SendSpams <36188980+SendSpams@users.noreply.github.com> Date: Fri, 6 Apr 2018 07:03:25 +0100 Subject: [PATCH 2/3] Update AAXtoMP3 --- AAXtoMP3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AAXtoMP3 b/AAXtoMP3 index 6c9778b..e0e6f1f 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -7,6 +7,8 @@ extension=mp3 mode=chaptered authcode=".authcode"; if [ -z ${HOME+x} ] && ! [ -z ${USERPROFILE+x} ]; then HOME="$USERPROFILE"; fi +authcodeDirs="${HOME}/ ./" + GREP=$(grep --version | grep -q GNU && echo "grep" || echo "ggrep") if ! [[ $(type -P "$GREP") ]]; then From db014f8f51395f629d25f5ada89da95c19cdc459 Mon Sep 17 00:00:00 2001 From: SendSpams <36188980+SendSpams@users.noreply.github.com> Date: Fri, 6 Apr 2018 07:04:19 +0100 Subject: [PATCH 3/3] Update AAXtoMP3 --- AAXtoMP3 | 1 - 1 file changed, 1 deletion(-) diff --git a/AAXtoMP3 b/AAXtoMP3 index e0e6f1f..8bf5418 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -8,7 +8,6 @@ mode=chaptered authcode=".authcode"; if [ -z ${HOME+x} ] && ! [ -z ${USERPROFILE+x} ]; then HOME="$USERPROFILE"; fi authcodeDirs="${HOME}/ ./" - GREP=$(grep --version | grep -q GNU && echo "grep" || echo "ggrep") if ! [[ $(type -P "$GREP") ]]; then