summaryrefslogtreecommitdiff
blob: ce219992e45861cdcb1e9f9e05576e3bdd3872eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
export TMP="${TMP:-/tmp}"
export V="1.13.0"
export NAME="baselayout-vserver"
export DEST="${TMP}/${NAME}-${V}"

if [[ $1 != "-f" ]] ; then
	echo "Performing sanity checks (run with -f to skip) ..."

	# Check that we're updated
	svnfiles=$( svn status 2>&1 | egrep -v '^(U|P)' )
	if [[ -n ${svnfiles} ]] ; then
		echo "Refusing to package tarball until svn is in sync:"
		echo "$svnfiles"
		exit 1
	fi
fi

echo "Creating tarball ..."
rm -rf ${DEST}
install -d -m0755 ${DEST}

for x in bin etc init.d sbin src rc-lists man ; do
	cp -ax $x ${DEST}
done

# do not yet package src/core stuff
#rm -rf ${DEST}/src/core

# copy net-scripts and remove older stuff
install -d -m0755 ${DEST}/lib/rcscripts
cp -ax net-scripts/init.d ${DEST}
cp -ax net-scripts/net.modules.d ${DEST}/lib/rcscripts
cp -ax net-scripts/conf.d ${DEST}/etc
ln -sfn net.lo ${DEST}/init.d/net.eth0

cp ChangeLog ${DEST}

chown -R root:root ${DEST}
chmod 0755 ${DEST}/sbin/*
chmod 0755 ${DEST}/init.d/*
( cd $TMP/${NAME}-${V} ; rm -rf `find -iname .svn` )
cd $TMP
tar cjvf ${TMP}/${NAME}-${V}.tar.bz2 ${NAME}-${V}
rm -rf ${NAME}-${V}

echo
du -b ${TMP}/${NAME}-${V}.tar.bz2