commit | d8c259af5ae8a5eba10bf1d8fbf368251c028caf | [log] [tgz] |
---|---|---|
author | Anthony Young <sleepsonthefloor@gmail.com> | Mon Sep 26 14:04:13 2011 -0700 |
committer | Anthony Young <sleepsonthefloor@gmail.com> | Mon Sep 26 14:04:13 2011 -0700 |
tree | 88f2d273ef119db2f64835daeb879908848193b9 | |
parent | 01ad91a32f1c01c446cbffde96eb32057f6f5694 [diff] [blame] |
use stackrc.example, and prompt user before copying
diff --git a/build_lxc.sh b/build_lxc.sh index 3d0ad89..4c624aa 100755 --- a/build_lxc.sh +++ b/build_lxc.sh
@@ -1,5 +1,12 @@ #!/usr/bin/env bash +# Use stackrc.example if stackrc is missing +if [ ! -e ./stackrc ]; then + read -n1 -p "No stackrc present. Copy stackrc.example to stackrc? (y/n) " + echo + [[ $REPLY = [yY] ]] && cp stackrc.example stackrc|| { echo "Aborting: Missing stackrc"; exit 1; } +fi + # Source params source ./stackrc