Merge pull request #54 from demonbane/fix_keep

Fix KEEP option
This commit is contained in:
Henric Andersson 2016-04-11 13:52:07 -07:00
commit 94c920214e

View file

@ -151,8 +151,8 @@ if [ "${AUTOUPDATE}" == "yes" ]; then
fi fi
# Sanity check # Sanity check
if [ "${EMAIL}" == "" -o "${PASS}" == "" ] && [ "${PUBLIC}" == "no" ]; then if [ "${EMAIL}" == "" -o "${PASS}" == "" ] && [ "${PUBLIC}" == "no" ] && [ ! -f /tmp/kaka ]; then
echo "Error: Need username & password to download PlexPass version. Otherwise run with -p to download public version." echo "Error: Need username & password or -k option to download PlexPass version. Otherwise run with -p to download public version."
exit 1 exit 1
fi fi
@ -263,7 +263,7 @@ if [ "${KEEP}" != "yes" -o ! -f /tmp/kaka ] && [ "${PUBLIC}" == "no" ]; then
exit 1 exit 1
fi fi
echo "OK" echo "OK"
else elif [ "$PUBLIC" != "no" ]; then
# It's a public version, so change URL and make doubly sure that cookies are empty # It's a public version, so change URL and make doubly sure that cookies are empty
rm 2>/dev/null >/dev/null /tmp/kaka rm 2>/dev/null >/dev/null /tmp/kaka
touch /tmp/kaka touch /tmp/kaka