forked from gvelez17/glimpse
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgentar
executable file
·31 lines (27 loc) · 829 Bytes
/
gentar
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
#!/bin/sh
# $Id: gentar,v 1.1 1998/04/27 16:11:23 pab Exp $
#
# Build a tar file image of this directory, checking out files from RCS.
# What version to build?
RELVER=${1-DEV}
srcdir="./glimpse-${RELVER}-src"
# Safety check---don't overwrite existing directory
if [ -d "${srcdir}" ] ; then
echo "$0: Please remove existing source archive ${srcdir}"
exit 1
fi
# Get the hierarchy first
dirs=`find . -type d`
# Now create the duplication area
mkdir ${srcdir}
cdir=`pwd`
# Duplicate the directory hierarchy; if the directory has an RCS area,
# check out its files, then remove the RCS link.
for d in ${dirs} ; do
mkdir -p ${srcdir}/${d}
if [ -e ${d}/RCS ] ; then
(cd ${srcdir}/${d} ; ln -s ${cdir}/${d}/RCS ; co -f RCS/* ; rm RCS)
fi
done
# Put all that into a tar file
tar cf glimpse-${RELVER}-src.tar ${srcdir}