mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-17 18:58:58 +01:00
AAXtoMP3: fix how .authcode is located fix issue #60
This commit is contained in:
parent
8887bee900
commit
db48c6a970
19
AAXtoMP3
19
AAXtoMP3
@ -55,18 +55,19 @@ auth_code="";
|
||||
for dir in $authcodeDirs; do
|
||||
codeFile="${dir}$authcode";
|
||||
|
||||
if [ ! -f "$codeFile" ]; then
|
||||
auth_code=$1
|
||||
shift
|
||||
break;
|
||||
elif [ -s "$codeFile" ]; then
|
||||
auth_code=`head -1 "$codeFile"`
|
||||
break;
|
||||
else
|
||||
echo "INFO: Sorry, empty \"$codeFile\" found, skipping.";
|
||||
if [ ! -f "$codeFile" -o ! -s "$codeFile" ]; then
|
||||
codeFile=""
|
||||
echo "INFO: Sorry, missing or empty \"$codeFile\" found, skipping.";
|
||||
fi;
|
||||
done;
|
||||
|
||||
if [ ! -f "$codeFile" ]; then
|
||||
auth_code=$1
|
||||
shift
|
||||
else
|
||||
auth_code=`head -1 "$codeFile"`
|
||||
fi
|
||||
|
||||
if [ -z "$auth_code" ]; then
|
||||
echo "INFO: Sorry, no authcode provided.";
|
||||
exit 1;
|
||||
|
Loading…
Reference in New Issue
Block a user