fi
}
+check_file() {
+ if [ -e $1 ] && [ ! -w $1 ]; then
+ error "File '$1' is not writable."
+ exit 1
+ fi
+}
+
download_file() {
info "Downloading '$1'."
build_package() {
local BUILD_SUCCESSFUL="no"
+ check_file "$TARGET"
make_work_dir
if [ "$UID" != "0" ]; then
exit 1
fi
+ check_file "$PKGMK_FOOTPRINT"
make_footprint > $PKGMK_FOOTPRINT
touch $TARGET
if [ "$PKGMK_UPDATE_MD5SUM" = "yes" ]; then
download_source
+ check_file "$PKGMK_MD5SUM"
make_md5sum > $PKGMK_MD5SUM
info "Md5sum updated."
exit 0