diff options
Diffstat (limited to 'games/wolfpack/scripts/configure')
-rw-r--r-- | games/wolfpack/scripts/configure | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/games/wolfpack/scripts/configure b/games/wolfpack/scripts/configure new file mode 100644 index 000000000000..125beed8cf90 --- /dev/null +++ b/games/wolfpack/scripts/configure @@ -0,0 +1,40 @@ +#!/bin/sh + +doquit () { + if [ $1 -ne 0 ]; then + echo User abort + rm -f /tmp/__input$$ + exit 1 + fi +} + +dialog --title "Wolfpack Empire Information" --inputbox "Name of deity" 8 60 2>/tmp/__input$$ + +doquit $? + +name=`cat /tmp/__input$$` + +dialog --title "Wolfpack Empire Information" --inputbox "Username of deity" 8 60 2>/tmp/__input$$ + +doquit $? + +username=`cat /tmp/__input$$` + +dialog --title "Wolfpack Empire Information" --inputbox "Email Address of game admin" 8 60 2>/tmp/__input$$ + +doquit $? + +email=`cat /tmp/__input$$` + +host=`hostname` +ip=`host -t a $host | awk '{print $4}'` +echo Email address is $email +echo Username is $username +echo Name is $name +echo Hostname is $host +echo IP is $ip + +FROM=$FILESDIR/build.conf.tmpl +TO=$WRKSRC/build.conf + +sed -e "s/%%NAME%%/$name/" -e "s/%%USERNAME%%/$username/" -e "s/%%EMAIL%%/$email/" -e "s/%%HOSTNAME%%/$host/" -e "s/%%IPADDR%%/$ip/" -e "s#%%EMPDIR%%#$PREFIX/wolfpack#" <$FROM >$TO |