X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/a619379ec7529c3ac6856b33288969687ec582ae..a3ab6ec5097ec2e77db278e457196111053bad25:/bin/dot diff --git a/bin/dot b/bin/dot index d816767..e2a83b3 100755 --- a/bin/dot +++ b/bin/dot @@ -47,6 +47,9 @@ EOF read -d '' EXTRA_HELP << EOF +dot list + display the contents of $TASKFILE + dot install SCRIPT updates ~/dot.HOSTNAME.yaml to run ~/dotfiles/SCRIPT.sh if it has not yet been run @@ -95,6 +98,11 @@ if [[ ! -f "$TASKFILE" ]]; then echo "$EMPTY_TASKFILE" >> $TASKFILE fi +if [ "$1" == "list" ]; then + cat $TASKFILE + exit 0 +fi + if [ "$1" == "setup" ]; then if [[ ! -f "$ANSIBLE" ]]; then mkdir -p "$ENVS" @@ -194,8 +202,8 @@ read -d '' RUN_INSTALL << EOF register: ret failed_when: > ("Error" in ret.stdout) or - (ret.stderr != '') or - (ret.rc != 10) + ("Error" in ret.stderr) or + (ret.rc != 0) when: not $2_installed.stat.exists - name: verify $2 is installed ansible.builtin.debug: @@ -225,7 +233,7 @@ read -d '' ADD_ENV << EOF stat: path: "$ENVS/$2" register: $2_path - - name: install $2 + - name: add env $2 ansible.builtin.shell: | cd $ENVS python3 -m venv $2