summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index fc30caea..558f0938 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -949,6 +949,18 @@ write_pkginfo() {
fi
}
+check_package() {
+ cd "$pkgdir"
+
+ # check existence of backup files
+ local file
+ for file in "${backup[@]}"; do
+ if [ ! -f "$file" ]; then
+ warning "$(gettext "Invalid backup entry : %s")" "$file"
+ fi
+ done
+}
+
create_package() {
if [ ! -d "$pkgdir" ]; then
error "$(gettext "Missing pkg/ directory.")"
@@ -956,6 +968,8 @@ create_package() {
exit 1 # $E_MISSING_PKGDIR
fi
+ check_package
+
cd "$pkgdir"
msg "$(gettext "Creating package...")"
@@ -1158,6 +1172,14 @@ check_sanity() {
fi
done
+ local file
+ for file in "${backup[@]}"; do
+ if [ "${file:0:1}" = "/" ]; then
+ error "$(gettext "Invalid backup entry : %s")" "$file"
+ return 1
+ fi
+ done
+
if [ "$install" -a ! -f "$install" ]; then
error "$(gettext "Install scriptlet (%s) does not exist.")" "$install"
return 1