usr

Modulate your userpace into POSIX-compliant shell scripts!
git clone git://clone.theohenson.com/usr.git
Log | Files | Refs | README

commit 480fdb1a1a8fcee1c3097363e0d470427a0387ff
parent faa653111747f22d2a95447779d8d306ab84284a
Author: Theo Henson <[email protected]>
Date:   Sun, 15 Nov 2020 15:59:41 -0500

Improve modules

Diffstat:
Mmodules/theo_dotfiles.mod.sh | 7+++++++
Musr | 1+
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/theo_dotfiles.mod.sh b/modules/theo_dotfiles.mod.sh @@ -7,6 +7,13 @@ DATA_DIR="${XDG_DATA_HOME#$HOME/}" CONFIG_DIR="${XDG_CONFIG_HOME#$HOME/}" theo_dotfiles_add() { + for DIR in $(theo_dotfiles_dirs) ; do + if ! [ -d "$HOME/$DIR" ] ; then + mkdir -p "$HOME/$DIR" + printf "theo_dotfiles: making directory %s/%s\n" "$HOME" "$DIR" + fi + done + for FILE in $(theo_dotfiles_files) ; do [ -f "$HOME/$FILE" ] && mv "$HOME/$FILE" "$HOME/$FILE".orig && \ printf "theo_dotfiles: moving %s/%s to %s/%s.orig\n" "$HOME" "$FILE" "$HOME" "$FILE" diff --git a/usr b/usr @@ -160,6 +160,7 @@ list_remote() { } update_remote() { + list_modules > "$USR_DIR"/modules/mod.list URL=$(cat "$USR_DIR"/var/remote) URL="$URL"modules/mod.list printf "usr: getting %s\n" "$URL"