Commit f1fde791 authored by Aral Balkan's avatar Aral Balkan

Removed clouds terminology from submit command. Updated argument parsing to...

Removed clouds terminology from submit command. Updated argument parsing to intelligently switch between ‘sites’ and ‘spotlight’ based on usage. Progress towards #17.
parent d5bff48c
Pipeline #646 skipped
......@@ -144,14 +144,31 @@ processPath(){
# Test category for correctness.
# echo "Testing category: $category"
if [[ $category != "trackers" ]] && [[ $category != "sites" ]] && [[ $category != "whitelist" ]] ; then
if [[ $category != "trackers" ]] && [[ $category != "sites" ]] && [[ $category != "spotlight" ]]; then
#
# Fatal error: category is incorrect.
#
fatalPathError "category (${category}) is incorrect"
fi
#
# Intelligently convert between spotlight and sites in case the person
# has confused the two (easy to do as drafts/sites are copied to the
# spotlight category).
#
# Let’s call this the “Do as I meant, not as I said” principle of design.
#
if [[ $isDraft = true ]] && [[ $category = "spotlight" ]]; then
category="sites"
fi
if [[ $isDraft = false ]] && [[ $category = "sites" ]]; then
category="spotlight"
fi
#
# Path is correct.
#
if [ $domain == "none" ]; then
# Category
......
......@@ -281,7 +281,7 @@ processOtherArgumentsHook(){
#
processGenericHook(){ tooFewArgumentsError "domain and merge message are missing"; }
processCategoryHook(){
echo "\nError: Please specify a domain in the form: trackers/<domain> or sites/<domain> or whitelist/<domain>."
echo "\nError: Please specify a domain in the form: trackers/<domain> or spotlight/<domain>."
showUsage
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment