summaryrefslogtreecommitdiff
path: root/scripts/make_dist.sh
diff options
context:
space:
mode:
authorchunkm0nkey <chunkm0nkey>2004-04-07 12:34:58 +0000
committerchunkm0nkey <chunkm0nkey>2004-04-07 12:34:58 +0000
commita9b5f049d2d415729eab99211522bba9bc008a2f (patch)
treec9cc4cb500ff7718308575cba7ddf76c2be9e135 /scripts/make_dist.sh
Initial revision
Diffstat (limited to 'scripts/make_dist.sh')
-rwxr-xr-xscripts/make_dist.sh75
1 files changed, 75 insertions, 0 deletions
diff --git a/scripts/make_dist.sh b/scripts/make_dist.sh
new file mode 100755
index 0000000..1b6eb37
--- /dev/null
+++ b/scripts/make_dist.sh
@@ -0,0 +1,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