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:
2024-05-30 14:23:14 +03:00
parent ede04e3aba
commit a3a97efd59
4 changed files with 144 additions and 24 deletions
+12 -1
View File
@@ -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