File: create-sign-tarball.sh

package info (click to toggle)
scrypt 1.2.0%2Bgit.3.c1a9826-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 456 kB
  • ctags: 328
  • sloc: ansic: 3,307; sh: 391; makefile: 103
file content (34 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

# Process command-line arguments
SCRYPTVERSION=$1
GNUPG_SIGNING_HOME=$2

# Check for required arguments
if [ -z "$SCRYPTVERSION" ] || [ -z "$GNUPG_SIGNING_HOME" ]; then
	echo "Usage: $0 SCRYPTVERSION GNUPG_SIGNING_HOME"
	exit 1
fi

# Check for correct OS
if [ `uname` != "FreeBSD" ]; then
	echo "Error: This script only works on FreeBSD due to the"
	echo "    sha256 \${PKGNAME}.tgz"
	echo "command, which has a different meaning on other OSes."
	exit 1
fi

# Constants
PKGNAME=scrypt-${SCRYPTVERSION}
PKGSIGS=scrypt-sigs-${SCRYPTVERSION}

# Get directory of script
dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)

# Create tarball
sh ${dir}/mktarball.sh $SCRYPTVERSION

# Sign tarball
sha256 ${PKGNAME}.tgz |			\
    GNUPGHOME=${GNUPG_SIGNING_HOME} gpg --clearsign \
    > ${PKGSIGS}.asc