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 0000000..974d26d Binary files /dev/null and b/man/aps.8.gz differ 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