From 64de631b3f66e90c076062b7f2d0a7b84b51d943 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Thu, 26 Aug 2021 12:13:29 +0200 Subject: [PATCH] add a suite of things --- aps | 33 ++++++++++++++++++++++++++++----- config/config | 3 ++- install.sh | 3 ++- man/aps.8.gz | Bin 0 -> 422 bytes settings | 9 +++++++++ 5 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 man/aps.8.gz create mode 100644 settings diff --git a/aps b/aps index 9408086..d3b9d62 100755 --- a/aps +++ b/aps @@ -1,4 +1,10 @@ #!/bin/sh + +################################# +# Alnux Packaging System, # +# the package manager for Alnux # +################################# + if [ -f "/etc/al/config" ]; then . /etc/al/config else @@ -8,6 +14,10 @@ else locpkg_database="${install_root}/var/aps/repos" lock="${install_root}/var/aps/lock" official="https://git.hippoz.xyz/alnux/repo" + debug=off +fi +if [ ${debug} = on ]; then + set -x fi die() { echo "aps: fatal: ${1}" @@ -17,11 +27,11 @@ die() { confirm(){ echo -ne "Are you sure? [Y/n] " read prompt - if [[ $prompt = [nN] ]]; then - die "[E] User said no. Exiting..." - elif [[ $prompt = [yY] ]]; then - else - die "[E] User gave invalid input. Exiting..." + if [[ ${prompt} = [nN] ]]; then + die "User said no. Exiting..." + elif [[ ${prompt} = [yY] ]]; then + else + die "User gave invalid input. Exiting..." fi } run_package_script() { @@ -140,6 +150,17 @@ upgrade() { unset pkg_config_depends done } +version(){ + echo "Alnux APS v0.0.8" +} +help(){ + echo "Alnux APS, the packaging system for Alnux." + echo "" + echo "sync - Synchronizes from package repository." + echo "install - Installs from local package information file and build file" + echo "upgrade - Upgrades from package repository." + echo "remove - Removes a package from /var/aps/installed and it's install files (payloadfiles)" +} main() { if [ -f "${lock}" ]; then echo "[E] A lock file already exists (another instance of the package manager could be running). If you're sure no package manager is running, remove the file ${lock}." @@ -158,6 +179,8 @@ main() { [ -z "${2}" ] && exit 0 install_package_from_repo "official" "${2}" ;; upgrade) upgrade "official" ;; + help) help ;; + version) version ;; *) die "[E] Invalid option ${1}, exiting..." ;; esac rm "${lock}" diff --git a/config/config b/config/config index c4db539..fd2aaf1 100755 --- a/config/config +++ b/config/config @@ -4,8 +4,9 @@ # Alnux Packaging System # ########################## temp_location="/var/tmp" -install_root="/var/tmp/alroot" +install_root="/" installed_pkg_database="${install_root}/var/aps/installed" locpkg_database="${install_root}/var/aps/repos" lock="${install_root}/var/aps/lock" official="https://git.hippoz.xyz/alnux/repo" +debug=off diff --git a/install.sh b/install.sh index 0494266..018a348 100755 --- a/install.sh +++ b/install.sh @@ -17,5 +17,6 @@ else install -v aps ${prefix}/usr/bin/ && install -v altools/sel ${prefix}/usr/bin/ && install -v altools/repo ${prefix}/usr/bin/ && - install -v config/config ${prefix}/etc/al + install -v config/config ${prefix}/etc/al && + install -v -Dm644 man/aps.8.gz ${prefix}/usr/share/man/man8/ fi diff --git a/man/aps.8.gz b/man/aps.8.gz new file mode 100644 index 0000000000000000000000000000000000000000..974d26dac1e6ab8e84c55a39b6cf54ee5327a52a GIT binary patch literal 422 zcmV;X0a^YZiwFoHX(wR-17UD;E;s8x{acB=!^O_89l_6h z82blk@ay#r9F6vc7VgDJ`l4JK#wle-)`q22lTV{n$;Q8UCb+XBbDex5WOcxC_n3(o zsCgG9W~Et?3gvI{SOZ645#viHO)2yb&vUa<+GB zWE4l@Vj`z6*VoZH@`V`M!4H8pOPcn&QbOkCO1Ln|vK0QjJX=3-a)v>*EqRY%SLCEA Q(CSP40-jC>R=NWK089(cO8@`> literal 0 HcmV?d00001 diff --git a/settings b/settings new file mode 100644 index 0000000..64a9aa3 --- /dev/null +++ b/settings @@ -0,0 +1,9 @@ +UnlockClient=true +UnlockStudio=false +FPSCapValues=[30.000000, 60.000000, 75.000000, 120.000000, 144.000000, 165.000000, 240.000000, 360.000000] +FPSCapSelection=0 +FPSCap=0.000000 +CheckForUpdates=true +NonBlockingErrors=true +SilentErrors=false +QuickStart=false