aboutsummaryrefslogtreecommitdiff
path: root/snag/getpkginfo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'snag/getpkginfo.sh')
-rwxr-xr-xsnag/getpkginfo.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/snag/getpkginfo.sh b/snag/getpkginfo.sh
new file mode 100755
index 0000000..0650740
--- /dev/null
+++ b/snag/getpkginfo.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# reads a package description script and outputs the attributes in a format easy
+# for the snag program to read
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <description script>" >&2
+ exit 1
+fi
+
+# load the description script
+. $1
+
+# echo package properties
+echo ID $pkg_id
+echo NAME $pkg_name
+echo DESC $pkg_desc