VCS_VERSION: remove Subversion support, add support for Git & tarball

building from tarball can be tested this way:

rsync -avix . /tmp/shellinabox --exclude-from=.gitignore --exclude=.git --delete --delete-excluded
(cd /tmp/shellinabox && autoreconf -i && ./configure && make && ./shellinaboxd --version)
This commit is contained in:
Alexandre Detiste 2015-05-14 08:56:10 +02:00
parent 89e40c5e3a
commit f3bb90eaf4
5 changed files with 14 additions and 45 deletions

View file

@ -254,8 +254,10 @@ clean-local:
shellinabox/keyboard-layout.h \
shellinabox/print-styles.h \
shellinabox/root_page.h \
shellinabox/shell_in_a_box.js \
shellinabox/shell_in_a_box.h \
shellinabox/styles.h \
shellinabox/vt100.js \
shellinabox/vt100.h
.css.h:
@ -321,7 +323,7 @@ clean-local:
-e t \
-e d "$<"`" \
-e "s/^#/\/\/ #/" \
-e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
-e "s/VERSION/\"@VERSION@ @VCS_REVISION@\"/g" \
"$<" >"$@"
.js.h:

5
commit
View file

@ -1,5 +1,10 @@
#!/bin/bash -e
echo "This script would only work on a Subversion repository"
echo "and is only kept for historical purpose... for now."
exit 1
# The script ensures that all commands succeed unless an error occurred. If it
# does though, the shell terminates the script and our exit handler runs.
trap 'tput bel || :; echo Failed! >&2' EXIT

View file

@ -2,7 +2,11 @@ AC_PREREQ(2.57)
dnl This is the one location where the authoritative version number is stored
AC_INIT(shellinabox, 2.15, markus@shellinabox.com)
VCS_REVISION=240
if test -e .git; then
VCS_REVISION=" (revision `cd $srcdir && git log -1 --format=format:%h`)"
else
VCS_REVISION=""
fi
AC_SUBST(VCS_REVISION)
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
[Most recent revision number in the version control system])

View file

@ -1117,7 +1117,7 @@ static void parseArgs(int argc, char * const argv[]) {
logSetLogLevel(verbosity);
} else if (!idx--) {
// Version
message("ShellInABox version " VERSION " (revision " VCS_REVISION ")");
message("ShellInABox version " VERSION VCS_REVISION);
exit(0);
}
}

42
update
View file

@ -1,42 +0,0 @@
#!/bin/bash -e
# If you want to track the status of the project in Subversion, run this script
# instead of relying on "svn update". The script makes sure you end up with a
# working copy of the source tree that is customized to the version of GNU
# "autotools" that are installed on your machine.
#
# Alternatively, you can always remove the entire tree and check out a fresh
# copy from Subversion.
[ -x "$(type -path svn)" ] || {
echo "You must have the 'svn' binary to use this script." >&2
exit 1
}
[ -x "$(type -path libtoolize)" ] || {
echo "You must install 'libtool', if you want to track SVN." >&2
echo "Alternatively, delete all files and check out a clean copy" \
"from SVN." >&2
exit 1
}
[ -x "$(type -path autoreconf)" -a -x "$(type -path aclocal)" ] || {
echo "You must install the GNU 'autotools', if you want to track SVN." >&2
echo "Alternatively, delete all files and check out a clean copy" \
"from SVN" >&2
exit 1
}
rm -rf aclocal.m4 configure config.guess config.h config.h.in config.sub \
ltmain.sh m4 Makefile.in
svn update
[ -z "$(svn st|grep '^C')" ] || {
echo "Some files could not be synchronized with the SVN repository." >&2
echo "You have to manually resolve the merge conflicts and rerun this " \
"script" >&2
exit 1
}
aclocal
libtoolize --force --copy
autoreconf
./configure