60 lines
1.2 KiB
Bash
60 lines
1.2 KiB
Bash
#!/bin/bash
|
|
#set -e # exit on the first command failure
|
|
|
|
###########################################################################################
|
|
#install ppp
|
|
###########################################################################################
|
|
CUR_DIR=`pwd`
|
|
INSTALL_DIR=""
|
|
__DEBUG="NO"
|
|
__INSTALL="NO"
|
|
__OFFLINE="YES"
|
|
usage()
|
|
{
|
|
echo " --install xxx - install path"
|
|
echo " -c, --clean - make clean"
|
|
echo " -h, --help - show help information"
|
|
echo " -d, --debug - debug compile"
|
|
echo " --offline - offline build"
|
|
exit 0
|
|
}
|
|
|
|
for i in "$@"
|
|
do
|
|
case $i in
|
|
-h|--help)
|
|
usage
|
|
shift;;
|
|
-c*|--clean*)
|
|
CLEAN=YES
|
|
shift;;
|
|
--install)
|
|
INSTALL_DIR=$2
|
|
__INSTALL="YES"
|
|
shift 2;;
|
|
-d|--debug)
|
|
__DEBUG=YES
|
|
shift;;
|
|
--offline)
|
|
__OFFLINE="YES"
|
|
shift;;
|
|
*)
|
|
;;
|
|
esac
|
|
done
|
|
|
|
echo "CLEAN = ${CLEAN}"
|
|
echo "INSTALLDIR= ${ISTALL_DIR}"
|
|
echo "__DEBUG= ${__DEBUG}"
|
|
echo "__INSTALL = ${__INSTALL}"
|
|
|
|
./configure
|
|
make
|
|
make install
|
|
|
|
if [ "${__INSTALL}" == "YES" ];then
|
|
cp -f /usr/local/sbin/pppd ../../../overfs/jw/release/usr/sbin/
|
|
else
|
|
cp -f /usr/local/sbin/pppd /usr/sbin/pppd
|
|
fi
|