summaryrefslogtreecommitdiff
path: root/control.sh
diff options
context:
space:
mode:
Diffstat (limited to 'control.sh')
-rwxr-xr-xcontrol.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/control.sh b/control.sh
index 394b9bd43..2d044e9f0 100755
--- a/control.sh
+++ b/control.sh
@@ -7,6 +7,10 @@ shift
export PKG_BASE=$(realpath "$(dirname "$0")")
. "${PKG_BASE}/helper.sh"
+if [[ -n $2 ]]; then
+ PKG_VRSN=$2
+fi
+
cat <<EOF
Package: ${PKG_NAME}
Essential: $([[ ${PKG_PRIO} == required ]] && echo yes || echo no)
@@ -32,9 +36,16 @@ fi
cat <<EOF
Maintainer: $(cat "${PKG_DATA}/_metadata/maintainer")
Architecture: darwin-arm
-Version: ${PKG_VRSN}
EOF
+echo -n "Version: ${PKG_VRSN}"
+
+if [[ $1 == status || $1 == available ]]; then
+ echo "-0"
+else
+ echo
+fi
+
if [[ $1 == available ]]; then
cat <<EOF
Size: $(find "${PKG_DEST}" -type f -exec cat {} \; | gzip -c | wc -c | cut -d $'\t' -f 1)