devel init

This commit is contained in:
Ohio2 2021-09-29 16:33:24 +02:00
parent 06bba6f68f
commit 38614d26f4
2 changed files with 18 additions and 5 deletions

View file

@ -1,3 +1,3 @@
# APS # APS
APS - Alnux Packaging System

21
aps
View file

@ -7,16 +7,21 @@
temp_location="/var/tmp" temp_location="/var/tmp"
install_root="/var/tmp/alroot" install_root="/var/tmp/alroot"
installed_pkg_database="${install_root}/var/aps/installed" 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" lock="${install_root}/var/aps/lock"
official="https://git.hippoz.xyz/alnux/repo" #official="https://git.hippoz.xyz/alnux/repo"
debug=off debug=off
function prn(){ function prn(){
echo -e "\e[34m==>\e[39m $1" echo -e "\e[34m==>\e[39m $1"
} }
function wrn(){ function wrn(){
echo -e "\e[34m==>\e[33m WARNING:\e[39m $1" echo -e "\e[34m==>\e[33m WARNING:\e[39m $1"
} }
function run(){
printf '%s\n' "$*"
"$@"
}
function err(){ function err(){
echo -e "\e[34m==>\e[31m ERROR:\e[39m $1" && echo -e "\e[34m==>\e[31m ERROR:\e[39m $1" &&
rm ${lock} 2>&1 > /dev/null && rm ${lock} 2>&1 > /dev/null &&
@ -28,6 +33,13 @@ function notf(){
function dbg(){ function dbg(){
wrn "THIS IS A DEBUG TEST BUILD, IT MAY NOT WORK, IT'S GLITCHY AS FUCK!" 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(){ function pkg_find(){
# i could not even bother, i had to copy kiss in some sense # i could not even bother, i had to copy kiss in some sense
set -- "$1" "$2" "$3" "${4:-"$AL_REPO"}" 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 " 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 " 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" 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" notf "AL_REPO set to /var/db/repo/core"
fi fi
cp -prv "${1}" "${temp_location}"
pkg_find $@ pkg_find $@
} }
function help(){ function help(){
prn "APS Version 0.1.0"
prn "h|help) prints this message" prn "h|help) prints this message"
prn "v|version) version" prn "v|version) version"
prn "s|sync) install package(s)" prn "s|sync) install package(s)"