Skip to content

Commit

Permalink
WIP: debug confirm.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
tom93 committed Jan 5, 2024
1 parent 557223d commit 081cc72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions script/confirm.bash
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/usr/bin/env bash
echo "XXX confirm.bash: $1"
echo "XXX stdin=$(readlink -f /dev/stdin; ls -l $(readlink -f /dev/stdin))"
set -x
# if AUTOCONFIRM environment variable set, auto-confirm
if [[ "$AUTOCONFIRM" ]] ; then exit 0 ; fi
#if [[ "$AUTOCONFIRM" ]] ; then exit 0 ; fi
if [[ -z "$DEFAULT" ]] ; then DEFAULT=0 ; fi

if [[ "$DEFAULT" = "0" ]] ; then
read -p "$1 [Y/n]? " -n 1 -r
else
read -p "$1 [y/N]? " -n 1 -r
fi
echo "XXX read returned $?; REPLY=${REPLY@Q}; stdin=$(readlink -f /dev/stdin; ls -l $(readlink -f /dev/stdin))"
echo "XXX read returned $?; REPLY=${REPLY@Q}"

if [[ -n "$REPLY" ]] ; then echo ; fi
if [[ -n "$REPLY" ]] ; then # not empty
Expand Down
4 changes: 2 additions & 2 deletions script/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ bash script/install/ruby.bash || exit 1 # check ruby version

bash script/install/postgresql.bash || exit 1 # create user & db if it doesn't exist

echo "EXIT EARLY"; exit 1

bash script/install/imagemagick.bash || exit 1 # install imagemagick

sudo apt-get install wkhtmltopdf xvfb || exit 1

echo "EXIT EARLY"; exit 1

bash script/install/nztrain.bash || exit 1 # fix files & directory structure

bash script/install/bundler.bash || exit 1
Expand Down

0 comments on commit 081cc72

Please sign in to comment.