#!/bin/bash set -e DEST_DIR="$1" BRANCH="${2:-master}" if [[ -z "$DEST_DIR" ]]; then >&2 echo 'You must specify a destination directory.' exit 1 fi if [[ -d "$DEST_DIR" ]]; then >&2 echo "Destination directory '$DEST_DIR' already exists." exit 1 fi DEST_DIR_BASENAME="$(basename $DEST_DIR)" cat < requirements-icekit.txt.replaced sed -e "s|:local|:master|" Dockerfile > Dockerfile.replaced mv requirements-icekit.txt.replaced requirements-icekit.txt mv Dockerfile.replaced Dockerfile if [[ -n $(which git) ]]; then echo read -p 'Would you like to initialize a Git repository for your new project and create an initial commit? (Y/n) ' -n 1 -r echo if [[ "${REPLY:-y}" =~ ^[Yy]$ ]]; then git init git add -A git commit -m 'Initial commit.' fi fi cat <