New way to run configuration scripts
This commit is contained in:
parent
21fa41c390
commit
77a164257c
|
@ -18,7 +18,7 @@ INSTALL = install
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
../data/VPN.h: ../data/VPN.interface
|
../data/VPN.h: ../data/VPN.interface
|
||||||
./appbroker.sh "../data/VPN.h"
|
./appbroker.sh -P "$(PREFIX)" -- "../data/VPN.h"
|
||||||
|
|
||||||
VPN_OBJS = vpn.o main.o
|
VPN_OBJS = vpn.o main.o
|
||||||
VPN_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
VPN_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||||
|
|
|
@ -4,16 +4,36 @@
|
||||||
|
|
||||||
|
|
||||||
#usage
|
#usage
|
||||||
usage()
|
_usage()
|
||||||
{
|
{
|
||||||
echo "Usage: ./appbroker.sh target" 1>&2
|
echo "Usage: appbroker.sh target" 1>&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#main
|
#main
|
||||||
|
args=`getopt P: $*`
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
_usage
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
set -- $args
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
-P)
|
||||||
|
#we can ignore it
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
APPINTERFACE="${1%%.h}.interface"
|
APPINTERFACE="${1%%.h}.interface"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user