Skip to content

Commit

Permalink
Bump version to 0.2.5 with a few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Senorsen committed Jun 28, 2015
1 parent eac29e8 commit 0a1fc71
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 16 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2.5-1
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=$(cat ../lib/version)
VERSION=$(cat ../VERSION)

cd rpm
./build.sh $VERSION
Expand Down
3 changes: 2 additions & 1 deletion build/debian/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion build/openwrt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions build/rpm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mkdir -p rpm/

# share
cp ../../miscellaneous/* rpm/
cp ../../VERSION rpm/

# lib
mkdir -p rpm/lib/
Expand Down
5 changes: 3 additions & 2 deletions build/rpm/build_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ..
Expand Down
1 change: 1 addition & 0 deletions lib/VERSION
1 change: 0 additions & 1 deletion lib/version

This file was deleted.

21 changes: 11 additions & 10 deletions lib/zjunet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -55,19 +56,19 @@ 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
vpn
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

0 comments on commit 0a1fc71

Please sign in to comment.