File: make_dist.sh

package info (click to toggle)
sqsh 2.1-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,000 kB
  • ctags: 1,113
  • sloc: ansic: 20,040; sh: 3,131; makefile: 514; sql: 94
file content (75 lines) | stat: -rwxr-xr-x 1,650 bytes parent folder | download | duplicates (6)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/sh

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null
then
	if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null
	then
		ac_n= ac_c='
' ac_t=' '
	else
		ac_n=-n ac_c= ac_t=
	fi
else
	ac_n= ac_c='\c' ac_t=
fi         

#
# Determine the version we are compiling.
#
version=`grep SQSH_VERSION src/sqsh_config.h | sed -e 's,[^0-9.],,g'`

echo
echo " ===================== BINARY DISTRIBUTION ====================="
echo
echo "Please enter a relatively short name for the operating system"
echo "you are compiling for, and any other indicators of build type"
echo "that you would like to include the resulting tar file. The"
echo "description you enter will become part of the name of the tar file"
echo "generated by this script.  For example, the name 'solaris-8-static'"
echo "will create a file called sqsh-$version-solaris-8-static.tar.gz"
echo
echo $ac_n "Description string: $ac_c"
read desc

tar_file="sqsh-$version-$desc.tar.gz"

#
# Creating a working directory.
#
tmp_dir=sqsh-$version
mkdir $tmp_dir
mkdir $tmp_dir/doc
mkdir $tmp_dir/scripts

#
# Place binary in root directory
#
cp src/sqsh $tmp_dir
chmod gou+rx $tmp_dir/sqsh

#
# Place install script in root directory
#
cp scripts/install.sh $tmp_dir
chmod gou+rx $tmp_dir/install.sh

#
# Basic readme files.
#
cp COPYING ChangeLog doc/README.bin $tmp_dir

#
# Documentation files.
#
cp doc/FAQ doc/global.sqshrc doc/sample.sqsh_m4 \
   doc/sample.sqshrc doc/advanced.sqshrc doc/sqsh.1 \
	$tmp_dir/doc

#
# Scripts
#
cp scripts/wrapper.sh.in $tmp_dir/scripts

echo " ==== GENERATING $tar_file ===="
tar cvf - $tmp_dir | gzip -9 -c > "$tar_file"
rm -fr $tmp_dir