Skip to content

Instantly share code, notes, and snippets.

@natterstefan
Last active October 2, 2020 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natterstefan/56e57bdae76e40eb67abeb569ea39b6b to your computer and use it in GitHub Desktop.
Save natterstefan/56e57bdae76e40eb67abeb569ea39b6b to your computer and use it in GitHub Desktop.
Alfred Workflow | makerlog
#!/bin/bash
filepath=$FILE_PATH
if [ -f "$filepath" ]
then
source "$filepath"
eval "makerlog $command '$task'" &> /dev/null
if [ $? == 0 ]; then
printf "Todo '%s' added successfully" "$task"
else
printf "Todo '%s' was not added successfully" "$task"
fi
else
echo "File $filepath does not exist"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment