From 38614d26f4078357977d1cbd6ffa07a63452b156 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Wed, 29 Sep 2021 16:33:24 +0200 Subject: [PATCH] devel init --- README.md | 2 +- aps | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 563de96..8a826e4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # APS - +APS - Alnux Packaging System diff --git a/aps b/aps index fce22c0..e8ec162 100755 --- a/aps +++ b/aps @@ -7,16 +7,21 @@ temp_location="/var/tmp" install_root="/var/tmp/alroot" installed_pkg_database="${install_root}/var/aps/installed" -locpkg_database="${install_root}/var/aps/repos" +#locpkg_database="${install_root}/var/aps/repos" lock="${install_root}/var/aps/lock" -official="https://git.hippoz.xyz/alnux/repo" +#official="https://git.hippoz.xyz/alnux/repo" debug=off + function prn(){ echo -e "\e[34m==>\e[39m $1" } function wrn(){ echo -e "\e[34m==>\e[33m WARNING:\e[39m $1" } +function run(){ + printf '%s\n' "$*" + "$@" +} function err(){ echo -e "\e[34m==>\e[31m ERROR:\e[39m $1" && rm ${lock} 2>&1 > /dev/null && @@ -28,6 +33,13 @@ function notf(){ function dbg(){ wrn "THIS IS A DEBUG TEST BUILD, IT MAY NOT WORK, IT'S GLITCHY AS FUCK!" } +function runbuildsh(){ + if [ -x "${2}/${1}" ]; then + prn "Running $1" + cd "${2}" || err "Running $1 has failed, check your permissions." + "${2}/${1}" "${2}/payload" "${2}" + fi +} function pkg_find(){ # i could not even bother, i had to copy kiss in some sense set -- "$1" "$2" "$3" "${4:-"$AL_REPO"}" @@ -54,14 +66,15 @@ function pkg_local(){ prn " edit /etc/profile or your shell's profile to include your repo and sub-repos, " prn " much like this: export AL_REPO=/var/db/repo/core:/var/db/repo/extra OR" prn " export Alnux Repo var like this: export AL_REPO=/var/db/repo/core:/var/db/repo/extra" - export AL_REPO=/var/db/repo/core + export AL_REPO="/var/db/repo/core" notf "AL_REPO set to /var/db/repo/core" fi + cp -prv "${1}" "${temp_location}" pkg_find $@ + } function help(){ - prn "APS Version 0.1.0" prn "h|help) prints this message" prn "v|version) version" prn "s|sync) install package(s)"