Loading .shell/funcs +11 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ do_update() local now=`date +%s` updated=`date -r $timestamp +%s 2>/dev/null` local BOLD_BLUE=$'\033[34;1m' DEFAULT=$'\033[m' local prompt="${BOLD_BLUE}Would you like to update dotfiles?${DEFAULT} " local unit if [ -n "$USE_PROMPT" ]; then if [ $now -lt $((updated + 604800)) ]; then Loading Loading @@ -171,4 +172,14 @@ do_update() # re-source this file unset SOURCED_SHELL_FUNCS . ~/.shell/funcs # ensure systemd units are enabled if type systemctl >/dev/null 2>&1; then systemctl --user daemon-reload for unit in ~/.config/systemd/user/*; do if [ -d "$unit" ]; then continue; fi echo "Enabling $unit" systemctl --user enable "${unit##*/}" 2>/dev/null done fi } Loading
.shell/funcs +11 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ do_update() local now=`date +%s` updated=`date -r $timestamp +%s 2>/dev/null` local BOLD_BLUE=$'\033[34;1m' DEFAULT=$'\033[m' local prompt="${BOLD_BLUE}Would you like to update dotfiles?${DEFAULT} " local unit if [ -n "$USE_PROMPT" ]; then if [ $now -lt $((updated + 604800)) ]; then Loading Loading @@ -171,4 +172,14 @@ do_update() # re-source this file unset SOURCED_SHELL_FUNCS . ~/.shell/funcs # ensure systemd units are enabled if type systemctl >/dev/null 2>&1; then systemctl --user daemon-reload for unit in ~/.config/systemd/user/*; do if [ -d "$unit" ]; then continue; fi echo "Enabling $unit" systemctl --user enable "${unit##*/}" 2>/dev/null done fi }