From cb46751b920cf41d0e026f5ad736c37d234f491e Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Fri, 27 Aug 2021 13:34:35 +0200 Subject: [PATCH 1/6] user config will now be read --- aps | 6 +++++- settings | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 settings diff --git a/aps b/aps index 7b5ce11..46b1498 100755 --- a/aps +++ b/aps @@ -5,7 +5,11 @@ # the package manager for Alnux # ################################# -if [ -f "/etc/al/config" ]; then +if [ -f "$XDG_CONFIG_HOME/al/config" ]; then + . $XDG_CONFIG_HOME/al/config +elif [ -f "$HOME/.config/al/config"]; then + . $HOME/.config/al/config +elif [ -f "/etc/al/config" ]; then . /etc/al/config else temp_location="/var/tmp" 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 From c2d0c0a7a4b23457d5af138cda07466272ee4687 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Fri, 27 Aug 2021 16:58:57 +0200 Subject: [PATCH 2/6] add list --- aps | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aps b/aps index 46b1498..3b68990 100755 --- a/aps +++ b/aps @@ -164,6 +164,9 @@ help(){ echo "upgrade - Upgrades from package repository." echo "remove - Removes a package from /var/aps/installed and it's install files (payloadfiles)." } +list(){ + ls ${installed_pkg_database} | sed 's/^README.md//g' +} 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}." @@ -184,6 +187,7 @@ main() { upgrade) upgrade "official" ;; help) help ;; version) version ;; + list) list ;; *) die "[E] Invalid option ${1}, exiting..." ;; esac rm "${lock}" From 2200e5bac67d957160ee89247f74e98c5800a310 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Sat, 28 Aug 2021 05:24:55 +0200 Subject: [PATCH 3/6] APS update --- aps | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aps b/aps index 3b68990..d6b1f32 100755 --- a/aps +++ b/aps @@ -162,7 +162,10 @@ help(){ 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)." + echo "remove - Removes a package from /var/aps/installed and it's install files (payloadfiles)." + echo "list - Lists currently installed packages." + echo "help - Display this message." + echo "version - Display the version." } list(){ ls ${installed_pkg_database} | sed 's/^README.md//g' From d0cc9bd951420eb3dac73be1674e722ae4d7fe60 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Sat, 28 Aug 2021 07:17:21 +0200 Subject: [PATCH 4/6] implement sources --- aps | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aps b/aps index d6b1f32..6356b32 100755 --- a/aps +++ b/aps @@ -37,6 +37,12 @@ confirm(){ die "User gave invalid input. Exiting..." fi } +sources_file(){ + pkg_config_sources="$(cat sources | sed -n 1)" + curl -# ${pkg_config_sources} -o ${1} + tar -xf ${1} ${1} + cd ${1} +} run_package_script() { { if [ -x "${2}/${1}" ]; then @@ -62,6 +68,8 @@ install_local_package() { pkg_config_ver="0" pkg_config_makedepends="" pkg_config_depends="" + # Download sources. + sources_file ${pkg_name} # Install package mkdir -p "${pkg_path}/payload" . "${pkg_path}/package" From 4375e666ee284fb04f6362388cf2d2659e3f42e5 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Sat, 28 Aug 2021 13:49:30 +0200 Subject: [PATCH 5/6] did i not push something --- settings | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 settings diff --git a/settings b/settings deleted file mode 100644 index 64a9aa3..0000000 --- a/settings +++ /dev/null @@ -1,9 +0,0 @@ -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 From 3014cb3241a1bcb4cc03b64cc41e612f7df54953 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Sat, 28 Aug 2021 14:37:37 +0200 Subject: [PATCH 6/6] fix functions --- aps | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/aps b/aps index 6356b32..ef12f79 100755 --- a/aps +++ b/aps @@ -37,12 +37,6 @@ confirm(){ die "User gave invalid input. Exiting..." fi } -sources_file(){ - pkg_config_sources="$(cat sources | sed -n 1)" - curl -# ${pkg_config_sources} -o ${1} - tar -xf ${1} ${1} - cd ${1} -} run_package_script() { { if [ -x "${2}/${1}" ]; then @@ -69,7 +63,12 @@ install_local_package() { pkg_config_makedepends="" pkg_config_depends="" # Download sources. - sources_file ${pkg_name} + pkg_config_sources="$(cat sources | sed -n 1)" + pkg_config_sources_to="$(cat sources | sed -n 1)" + pkg_config_sources_to="$(echo ${pkg_config_sources_to} | sed s|.*/||)" + curl -# ${pkg_config_sources} -o ${pkg_config_sources_to} + tar -xf ${pkg_config_sources_to} ${pkg_name} + cd ${pkg_name} # Install package mkdir -p "${pkg_path}/payload" . "${pkg_path}/package"