mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
41 lines
940 B
Plaintext
41 lines
940 B
Plaintext
|
#!/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
|