This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z "$1" ]]; then | |
_monitor_dir="$HOME/Pictures" | |
else | |
_monitor_dir="$1" | |
fi | |
if [[ ! -d "${_monitor_dir}" ]]; then | |
echo "Can't find directory '${_monitor_dir}', does it exist?" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
_echo_usage_and_abort() { | |
echo "Usage: $0 {start|stop} [interval]" | |
exit 1 | |
} | |
if [[ ! -d '.hg' ]]; then | |
cat <<EOM | |
This directory does not appear to be a mercurial repository. Try running this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__colorize_arg () | |
{ | |
local color='' | |
case "$1" in | |
# Other options: AM, AM/REBASE, CHERRY-PICKING, BISECTING | |
*'|MERGING'* | *'|REBASE'*) # Merging or rebasing | |
color="0;31" # Red | |
;; | |
*'*+'*) # Unstaged + staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ls -ldt * | head -n 1 | tr -s ' ' | cut -d ' ' -f 9- |
NewerOlder