mirror of
https://github.com/EnumeratedDev/bpm-utils.git
synced 2026-09-16 02:56:11 +00:00
Updated source.default, updated bpm-package and added bpm-convert
source.default now uses the new PKGBUILD-like structure bpm-package now accepts a '-c' flag that creates an additional binary package from a source package bpm-convert creates a binary package from a source package
This commit is contained in:
+12
-1
@@ -5,7 +5,14 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
output=$1
|
||||
while getopts "c" flag; do
|
||||
case "$flag" in
|
||||
c) CONVERT=true;;
|
||||
*) exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
output="${@:$OPTIND:1}"
|
||||
|
||||
if [[ ! "$output" =~ ^[a-z.A-Z0-9_-]{1,}$ ]]; then
|
||||
echo "Invalid output name! The name must only contain letters, numbers, hyphens or underscores!"
|
||||
@@ -67,3 +74,7 @@ fi
|
||||
echo "Creating $type package as $output"
|
||||
|
||||
tar -czf "$output" "${toCompress[@]}"
|
||||
|
||||
if "$CONVERT" && [[ "$type" == "source" ]]; then
|
||||
bpm-convert "$output"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user