%PDF- %PDF-
Direktori : /usr/local/libexec/qinst/ |
Current File : //usr/local/libexec/qinst/extract |
#!/bin/sh # Extract package for quick install set -e OPT_QUIET= while getopts "q" opt; do case "${opt}" in q) OPT_QUIET="yes" ;; *) ;; esac done shift $(expr ${OPTIND} - 1) DISTFILE="$1" set -u _error() { local msg="$1" test -z "${OPT_QUIET}" && echo "${msg}" exit 1 } CURDIR="$(realpath $(pwd))" WRKDIR="${CURDIR}/work" DISTDIR="${CURDIR}/../../distfiles" test -n "${DISTFILE}" -a -r "${DISTDIR}/${DISTFILE}" || _error "Usage: $0 DISTFILE" install -m 0705 -d ${WRKDIR} || _error "Error: Permission denied" tar -xzopf ${DISTDIR}/${DISTFILE} -C ${WRKDIR} || _error "Error: Failed to extract" : end of script