Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 28 lines (27 sloc) 1.35 KB
#!/bin/bash
################################################################################
# gpgdir.SlackBuild -- pyllyukko@maimed.org -- 26.1.2007 (originally for psad) #
################################################################################
declare -r RPM_BUILDER="http://www.cipherdyne.org/scripts/cd_rpmbuilder.tar.gz"
declare -r RPM_ROOT_DIR="/usr/src/rpm"
declare -r ARCH="i386"
declare -ri BUILD=1
GPGDIR_VERSION=`wget --no-verbose --output-document=- http://www.cipherdyne.org/gpgdir/gpgdir-latest` || {
echo "error!" 1>&2
exit 1
}
################################################################################
wget --no-verbose --output-document=- "${RPM_BUILDER}" | tar xz --to-stdout | perl -- - -p gpgdir -r "${RPM_ROOT_DIR}"
[ $[ ${PIPESTATUS[0]} | ${PIPESTATUS[1]} | ${PIPESTATUS[2]} ] -ne 0 ] && {
echo "error!" 1>&2
exit 1
}
[ ! -f "${RPM_ROOT_DIR}/RPMS/${ARCH}/gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.rpm" ] && {
echo "error: file \`gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.rpm' doesn't exist!" 1>&2
exit 1
}
pushd "${RPM_ROOT_DIR}/RPMS/${ARCH}" || exit 1
rpm2tgz "gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.rpm" || exit 1
mv -v "gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.tgz" "gpgdir-${GPGDIR_VERSION}-${ARCH}-${BUILD}.tgz" || exit 1
ls -l "${RPM_ROOT_DIR}/RPMS/${ARCH}/gpgdir-${GPGDIR_VERSION}-${ARCH}-${BUILD}.tgz"
exit ${?}
Jump to Line
Something went wrong with that request. Please try again.