File: makedist

package info (click to toggle)
saml 970418-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,204 kB
  • ctags: 1,701
  • sloc: ansic: 17,182; sh: 2,583; yacc: 497; perl: 264; makefile: 250; python: 242
file content (21 lines) | stat: -rwxr-xr-x 578 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#
# Usage: makedist [name-suffix]
#
# Creates a saml${suffix}.tgz archive suitable for distribution, and saves
# our RCS files in saml_rcs.tgz. FILES is supposed to contain the file list.

case $# in
  0) ARCHIVE=saml-`date +%y%m%d` ;;
  1) ARCHIVE=saml$1 ;;
  *) echo "Usage: $0 [suffix]" 1>&2; exit 1 ;;
esac

# First, copy the important files in a subdirectory
mkdir $ARCHIVE
tar -cf- `cat FILES` | (cd $ARCHIVE; tar -xf-)

# Create the archives and remove the temporary subdirectory
tar -cvzf $ARCHIVE.tgz $ARCHIVE
rm -rf $ARCHIVE
tar -cvzf saml_rcs.tgz RCS */RCS