diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-07-22 09:09:18 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-07-22 09:09:18 -0400 |
| commit | 5365f8fa8d6ebfbf3ba92816abe55a99feff6f25 (patch) | |
| tree | 563605dabaf611ebb0c1ee1b65aa56690b01b4fd /snag/scripts | |
| parent | 165816f7854340c3ca09287aee66968777af61ad (diff) | |
clean up
Diffstat (limited to 'snag/scripts')
| -rwxr-xr-x | snag/scripts/get_pkg_attrs.sh | 22 | ||||
| -rwxr-xr-x | snag/scripts/run_pkg_install.sh | 16 |
2 files changed, 38 insertions, 0 deletions
diff --git a/snag/scripts/get_pkg_attrs.sh b/snag/scripts/get_pkg_attrs.sh new file mode 100755 index 0000000..25f9177 --- /dev/null +++ b/snag/scripts/get_pkg_attrs.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# reads a package description script and outputs the attributes in a format easy +# for the snag program to read. it does not do any other validation, and should +# not be used by other programs + +if [ -z "$1" ]; then + echo "Usage: $0 <description script>" >&2 + exit 1 +fi + +# load the description script +. $1 + +# output package attributes (type char, value, null delimiter) +echoatt() { [ -n "$2" ] && printf "$1$2\0"; } +echoatt i "$pkg_id" +echoatt n "$pkg_name" +echoatt d "$pkg_desc" +echoatt w "$pkg_webpage" +echoatt l "$pkg_license" +echoatt v "$pkg_version" diff --git a/snag/scripts/run_pkg_install.sh b/snag/scripts/run_pkg_install.sh new file mode 100755 index 0000000..d48d831 --- /dev/null +++ b/snag/scripts/run_pkg_install.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# reads a package description script and runs the configure, build, and install +# steps. intended only for use by snag program +if [ -z "$1" ]; then + echo "Usage: $0 <description script>" >&2 + exit 1 +fi + +# load the description script +. $1 + +# run all install steps for package +configure +build +install |
