X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/9d039fd7e312d818f4b4f380541fd28ba19c5681..a619379ec7529c3ac6856b33288969687ec582ae:/bin/dot diff --git a/bin/dot b/bin/dot index dc3e8fa..d816767 100755 --- a/bin/dot +++ b/bin/dot @@ -9,6 +9,8 @@ INSTALLS="$DOTFILES/install" # Install scripts DOT="$HOME/.dot" # Touched files go here to track installs REQS="$DOTFILES/reqs" # Python env requirements.txt files +mkdir -p "$DOT" + read -d '' HELP << EOF dot - a (mostly) one script dotfiles manager @@ -164,7 +166,7 @@ if [ "$1" == "apply" ]; then echo "$TASKFILE is missing. Run 'dot setup'" exit 1 fi - $ANSIBLE $TASKFILE + $ANSIBLE -v $TASKFILE fi if [ "$1" == "install" ]; then @@ -188,8 +190,12 @@ read -d '' RUN_INSTALL << EOF register: $2_installed - name: install $2 ansible.builtin.shell: | - "$INSTALLS/$2.sh" - touch "$DOT/$2.installed" + "$INSTALLS/$2.sh" && touch "$DOT/$2.installed" + register: ret + failed_when: > + ("Error" in ret.stdout) or + (ret.stderr != '') or + (ret.rc != 10) when: not $2_installed.stat.exists - name: verify $2 is installed ansible.builtin.debug: