aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-09-16 18:30:56 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-09-16 18:30:56 -0300
commitb779d46ff89c1099b7af610f71a00b6b738f9c69 (patch)
tree41837b2ee97f9e04e8fb5b8d98bf95fa1e4e7545
parentcf08643c9cb94be54cfbb461d1404308a3bf3a16 (diff)
downloadscripts-b779d46ff89c1099b7af610f71a00b6b738f9c69.tar.gz
scripts-b779d46ff89c1099b7af610f71a00b6b738f9c69.tar.bz2
Check for mr and folders
-rwxr-xr-xstatus4
-rwxr-xr-xtodo4
2 files changed, 7 insertions, 1 deletions
diff --git a/status b/status
index f40980f..e042968 100755
--- a/status
+++ b/status
@@ -77,7 +77,9 @@ function status_run {
# Update your mrconfig and check all registered repositories
# Pipe through cat so we don't have to deal with mr's dynamic output weirdness
- mrconfig-updater && mr -m status | cat
+ if which mr &> /dev/null; then
+ mrconfig-updater && mr -m status | cat
+ fi
# Check your TODO lists
todo
diff --git a/todo b/todo
index bc49459..a4589c7 100755
--- a/todo
+++ b/todo
@@ -22,6 +22,10 @@ FOLDERS="`echo $WORKPATH | tr ':' ' ' | sed -e "s|~|$HOME|g"`"
# Iterate
function todo_find {
for folder in $FOLDERS; do
+ if [ ! -d "$folder" ]; then
+ continue
+ fi
+
find $folder/ -maxdepth $TODO_MAXDEPTH -xtype f -iname 'todo*' | while read todo; do
# Ignore lists without tasks
if grep -q -e '*' -e '-' $todo; then