1
0
mirror of https://github.com/QSCTech/zjunet.git synced 2026-01-22 03:34:48 +08:00

Bump version to 0.2.5 with a few changes

This commit is contained in:
Senorsen 2015-06-28 20:19:12 +08:00
parent eac29e8bc4
commit 0a1fc71944
9 changed files with 26 additions and 16 deletions

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.2.5-1

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=$(cat ../lib/version)
VERSION=$(cat ../VERSION)
cd rpm
./build.sh $VERSION

View File

@ -7,10 +7,11 @@ VERSION=$1
# share
mkdir -p ./debian/usr/share/zjunet
cp ../../miscellaneous/* ./debian/usr/share/zjunet
cp ../../VERSION ./debian/usr/share/zjunet
# lib
mkdir -p ./debian/usr/lib/zjunet
cp ../../lib/* ./debian/usr/lib/zjunet
cp ../../lib/*.sh ./debian/usr/lib/zjunet
# bin
mkdir -p ./debian/usr/bin

View File

@ -4,9 +4,14 @@ rm -rf *.opk
VERSION=$1
# share
mkdir -p ./debian/usr/share/zjunet
cp ../../miscellaneous/* ./debian/usr/share/zjunet
cp ../../VERSION ./debian/usr/share/zjunet
# lib
mkdir -p ./debian/usr/lib/zjunet
cp ../../lib/* ./debian/usr/lib/zjunet
cp ../../lib/*.sh ./debian/usr/lib/zjunet
# bin
mkdir -p ./debian/usr/bin

View File

@ -10,6 +10,7 @@ mkdir -p rpm/
# share
cp ../../miscellaneous/* rpm/
cp ../../VERSION rpm/
# lib
mkdir -p rpm/lib/

View File

@ -40,7 +40,7 @@ for f in *.sh; do
echo "install -m 755 lib/$f \$RPM_BUILD_ROOT/usr/lib/zjunet/$f" >> ../zjunet.spec
done
cd ..
echo 'install -m 644 lib/version $RPM_BUILD_ROOT/usr/lib/zjunet/version' >> zjunet.spec
echo 'install -m 644 VERSION $RPM_BUILD_ROOT/usr/share/zjunet/VERSION' >> zjunet.spec
echo 'install -m 644 qsc.public.key $RPM_BUILD_ROOT/usr/share/zjunet/qsc.public.key' >> zjunet.spec
echo 'install -m 644 qsc.repo $RPM_BUILD_ROOT/usr/share/zjunet/qsc.repo' >> zjunet.spec
echo "" >> zjunet.spec
@ -50,8 +50,9 @@ echo "/usr/bin/zjunet" >> zjunet.spec
echo "/usr/share/zjunet/qsc.public.key" >> zjunet.spec
echo "/usr/share/zjunet/qsc.repo" >> zjunet.spec
echo "/usr/share/zjunet/zjunet-postinst" >> zjunet.spec
echo "/usr/share/zjunet/VERSION" >> zjunet.spec
cd lib
for f in *; do
for f in *.sh; do
echo "/usr/lib/zjunet/$f" >> ../zjunet.spec
done
cd ..

1
lib/VERSION Symbolic link
View File

@ -0,0 +1 @@
../VERSION

View File

@ -1 +0,0 @@
0.2.4-6

View File

@ -40,13 +40,14 @@ case "$1" in
dns)
"${BASEDIR}/dns.sh"
;;
--version)
version=$(cat "${BASEDIR}/version" | sed 's/-.*//')
echo "zjunet version: zjunet-$version"
version|--version)
version_full=`cat "${BASEDIR}/VERSION"`
version=$(echo $version_full | sed 's/-.*//')
echo "zjunet version: $version (${version_full})"
;;
*)
cat <<EOF
zjunet: CLI Tool (VPN/WLAN/DNS) for Zjuer
zjunet: cli tool (VPN/WLAN/DNS) for network connection in ZJU
Usage: zjunet [ACTION]
@ -55,7 +56,7 @@ Actions:
add Add a user
list List all enabled users
edit Edit a (enabled) user
Note: to delete/disable a user, edit /etc/xl2tpd/xl2tpd.conf yourself
* Note: to delete/disable a user, edit /etc/xl2tpd/xl2tpd.conf
all
connect(-c) Connect VPN & ZJUWLAN, and combine them using nexthop
disconnect(-d) Disconnect VPN & ZJUWLAN
@ -63,11 +64,11 @@ Actions:
connect(-c) Connect VPN and set up ip route
disconnect(-d) Disconnect VPN and reset ip route
wlan
connect(-c) Login ZJUWLAN via curl
disconnect(-d) Logout ZJUWLAN via curl
route Set up ip route
dns Test and set up DNS Server
--version Show Version
connect(-c) Login ZJUWLAN using curl
disconnect(-d) Logout ZJUWLAN using curl
route Set up static route
dns [server] Test and set up DNS Server (default: 10.10.0.21)
version Display program version
EOF
;;
esac