github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/ci/scripts/iscc-concourse (about) 1 #!/bin/sh 2 3 SCRIPTNAME=$1 4 INNO_BIN="Inno Setup 5/ISCC.exe" 5 6 # Check if variable is set 7 [ -z "$SCRIPTNAME" ] && { echo "Usage: $0 <SCRIPT_NAME>"; echo; exit 1; } 8 9 # Check if filename exist 10 [ ! -f "$SCRIPTNAME" ] && { echo "File not found. Aborting."; echo; exit 1; } 11 12 # Check if wine is present 13 command -v wine >/dev/null 2>&1 || { echo >&2 "I require wine but it's not installed. Aborting."; echo; exit 1; } 14 15 # Get inno setup path 16 INNO_PATH="/tmp/.wine/${INNO_BIN}" 17 echo $INNO_PATH 18 19 # run a wine command to create the ~/.wine config directory, 'winepath' needs this to run 20 wine version 21 22 # Translate unix script path to windows path 23 # SCRIPTNAME=$(winepath -w "$SCRIPTNAME" 2> /dev/null) 24 SCRIPTNAME=$(winepath -w "$SCRIPTNAME") 25 echo SCRIPTNAME: $SCRIPTNAME 26 27 # Check if Inno Setup is installed into wine 28 #[ ! -f "$INNO_PATH" ] && { echo "Install Inno Setup 5 Quickstart before running this script."; echo; exit 1; } 29 30 # Compile! 31 wine "$INNO_PATH" "$SCRIPTNAME" 32 33 echo $?