diff --git a/convert-psp b/convert-psp old mode 100644 new mode 100755 index f68fbd9..148afb6 --- a/convert-psp +++ b/convert-psp @@ -5,11 +5,19 @@ f_convert-psp(){ } help(){ - printf "Usage: $0 \"directory\" \"URL\"\n" + printf "Usage: $0\n" + exit 1 +} + +nojson(){ + printf "This program needs a configuration file, named \"subscriptions.json\".\n" + printf "Please create this file first.\n" + printf "See the readme for instructions on how to create it.\n" exit 1 } [[ "$1" == "-h" || "$1" == "--help" ]] && help +[ ! -f subscriptions.json ] && nojson saveifs=$IFS IFS=$'\n'