Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiyuu Nobori <da.git@softether.co.jp>2014-04-08 17:26:37 +0400
committerDaiyuu Nobori <da.git@softether.co.jp>2014-04-08 17:26:37 +0400
commita22f8216ae5158c722560dee468960b58467b3e3 (patch)
tree92c0f4fd48f02eccf4771ba327375ce50c4a9cb9
parent19ca16ef2b25948af1f4af448bf5ed5ca0312ac7 (diff)
parent0f49c92c31d60a920e6e76a7163edbc960be4cb9 (diff)
Merge pull request #45 from sahal/master
A few minor fixes
-rwxr-xr-xdebian/dch-generate.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/debian/dch-generate.sh b/debian/dch-generate.sh
index 124552c9..285ada5f 100755
--- a/debian/dch-generate.sh
+++ b/debian/dch-generate.sh
@@ -9,6 +9,7 @@
# version 2 as published by the Free Software Foundation.
# warning: the following file has CRLF line endings (Windows)
+# the location of the following file is relative to this script
cbuild="../src/CurrentBuild.txt"
# required for debian packaging
@@ -20,17 +21,19 @@ tzone="+09:00"
entry="* See: http://www.softether.org/5-download/history"
# are you a debian maintainer?
-if [ ! -e "$DEBFULLNAME" ]; then
+if [ -z "$DEBFULLNAME" ]; then
DEBFULLNAME="John Q. Sample"
fi
-if [ ! -e "$DEBEMAIL" ]; then
+if [ -z "$DEBEMAIL" ]; then
DEBEMAIL="tamade@example.org"
fi
-# check if ./changelog exists, check if $cbuild exists
+# where am i located? in $DIR, of course!
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+cd "$DIR"
+# check if debian/changelog exists, check if $cbuild exists
if [ ! -e ./changelog ]; then
echo "Am I in debian/? I can't find changelog"
- echo "Maybe run: touch debian/changelog ?"
exit 1
fi
if [ ! -e "$cbuild" ]; then
@@ -52,7 +55,7 @@ majorversion="$(echo "${cbuildarray[1]}" | awk '{sub(/[0-9]/,"&.",$0);print $0}'
# "${cbuildarray[3]}" is split and the second half is converted from
# from "131655" to "13:16:55" using GNU awk then it's put back together
# (like humpty dumpty) and sent to GNU date for conversion to UTC
-time="$(echo ${cbuildarray[3]#*_} | awk '{gsub(/[0-9][0-9]/,"&:",$0);print $0}')"
+time="$(echo "${cbuildarray[3]#*_}" | awk '{gsub(/[0-9][0-9]/,"&:",$0);print $0}')"
date="$(date -R --date="$(echo "${cbuildarray[3]%_*}"" ""${time%?}""$tzone")")"
# print the new debian changelog
@@ -61,6 +64,5 @@ echo
echo " ""$entry"
echo
echo " --"" ""$DEBFULLNAME"" <""$DEBEMAIL""> ""$date"
-echo
exit 0