master #4
1 changed files with 104 additions and 99 deletions
203
patch
203
patch
|
@ -1,117 +1,122 @@
|
||||||
diff --git a/aps b/aps
|
|
||||||
index 8bc1ca3..3eefa4e 100644
|
|
||||||
--- a/aps
|
|
||||||
+++ b/aps
|
|
||||||
@@ -118,7 +118,7 @@ upgrade() { # --- upgrades
|
|
||||||
unset pkg_config_depends
|
|
||||||
done
|
|
||||||
}
|
|
||||||
-help(){
|
|
||||||
+help(){ # --- displays help
|
|
||||||
echo 'To install locally, do:'
|
|
||||||
echo 'aps install'
|
|
||||||
echo
|
|
||||||
@@ -132,6 +132,9 @@ help(){
|
|
||||||
echo 'aps upgrade'
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
+local_installed_list(){ # --- local installed list
|
|
||||||
+ ls ${installed_pkg_database}
|
|
||||||
+}
|
|
||||||
main() { # --- does soem stuff
|
|
||||||
if [ -f "${lock}" ]; then
|
|
||||||
echo "[E] A lock file already exists. If you're sure no package manager is running, remove the file ${lock}."
|
|
||||||
@@ -146,7 +149,8 @@ main() { # --- does soem stuff
|
|
||||||
[ -z "${2}" ] && die "[*] No targets specified."
|
|
||||||
install_package_from_repo "official" "${2}" ;;
|
|
||||||
upgrade) upgrade "official" ;;
|
|
||||||
- help) help
|
|
||||||
+ help) help ;;
|
|
||||||
+ list) local_installed_list ;;
|
|
||||||
*) die "[E] Invalid option ${1}, exiting..." ;;
|
|
||||||
esac
|
|
||||||
rm "${lock}"
|
|
||||||
diff --git a/patch b/patch
|
diff --git a/patch b/patch
|
||||||
index 890bc1b..e69de29 100644
|
index 402f281..e69de29 100644
|
||||||
--- a/patch
|
--- a/patch
|
||||||
+++ b/patch
|
+++ b/patch
|
||||||
@@ -1,79 +0,0 @@
|
@@ -1,117 +0,0 @@
|
||||||
-diff --git a/aps b/aps
|
-diff --git a/aps b/aps
|
||||||
-index d7a4466..42918d3 100644
|
-index 8bc1ca3..3eefa4e 100644
|
||||||
---- a/aps
|
---- a/aps
|
||||||
-+++ b/aps
|
-+++ b/aps
|
||||||
-@@ -12,6 +12,7 @@ die() {
|
-@@ -118,7 +118,7 @@ upgrade() { # --- upgrades
|
||||||
- exit 2
|
|
||||||
- }
|
|
||||||
- run_package_script() { # --- $2 is the package path, and $1 is the script to run
|
|
||||||
-+ # --- RPS installs to root
|
|
||||||
- {
|
|
||||||
- if [ -x "${2}/${1}" ]; then
|
|
||||||
- echo ":: Running ${1}"
|
|
||||||
-@@ -20,7 +21,7 @@ run_package_script() { # --- $2 is the package path, and $1 is the script to run
|
|
||||||
- fi
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
--install_local_package() {
|
|
||||||
-+install_local_package() { # --- Install-Local-Package install package LOCALLY!
|
|
||||||
- [ ! -e "${1}" ] && die "[E] File ${1} does not exist. Exiting..."
|
|
||||||
- # Extract the package
|
|
||||||
- echo "[*] Copying package ${1} into temporary location ${temp_location}..."
|
|
||||||
-@@ -69,7 +70,7 @@ install_local_package() {
|
|
||||||
- unset pkg_config_makedepends
|
|
||||||
- unset pkg_config_depends
|
|
||||||
- }
|
|
||||||
--remove_local_package() {
|
|
||||||
-+remove_local_package() { # --- Removes local packges
|
|
||||||
- pkg_path="${installed_pkg_database}/${1}"
|
|
||||||
- [ ! -d "${pkg_path}" ] && die "Package could not be found in local installed package database. Exiting..."
|
|
||||||
- payloadfiles_path="${pkg_path}/payloadfiles"
|
|
||||||
-@@ -79,7 +80,7 @@ remove_local_package() {
|
|
||||||
- rm -rv "${pkg_path}"
|
|
||||||
- echo "[*] Removal complete for target ${pkg_name}"
|
|
||||||
- }
|
|
||||||
--sync_local_repo_database() {
|
|
||||||
-+sync_local_repo_database() { # --- syncs to local repo databese
|
|
||||||
- echo ":: Syncing local database for repo ${1}..."
|
|
||||||
- if [ ! -d "${locpkg_database}/${1}" ]; then
|
|
||||||
- echo ":: Local database for repo ${1} does not exist, cloning..."
|
|
||||||
-@@ -95,7 +96,7 @@ install_package_from_repo() { # NOTE(hippoz): This can get a tad confusing... ${
|
|
||||||
- [ ! -d "${locpkg_database}/${1}/${2}" ] && die "[E] Target not found."
|
|
||||||
- install_local_package "${locpkg_database}/${1}/${2}"
|
|
||||||
- }
|
|
||||||
--upgrade() {
|
|
||||||
-+upgrade() { # --- upgrades
|
|
||||||
- echo ":: Upgrading installed packages..."
|
|
||||||
- unset_config_values
|
|
||||||
- cd "${installed_pkg_database}" || die "Could not enter installed package database. Exiting..."
|
|
||||||
-@@ -117,7 +118,21 @@ upgrade() {
|
|
||||||
- unset pkg_config_depends
|
- unset pkg_config_depends
|
||||||
- done
|
- done
|
||||||
- }
|
- }
|
||||||
--main() {
|
--help(){
|
||||||
-+help(){
|
-+help(){ # --- displays help
|
||||||
-+ echo 'To install locally, do:'
|
- echo 'To install locally, do:'
|
||||||
-+ echo 'aps install'
|
- echo 'aps install'
|
||||||
-+ echo
|
- echo
|
||||||
-+ echo 'To install from repo (synchronize), do:'
|
-@@ -132,6 +132,9 @@ help(){
|
||||||
-+ echo 'aps sync'
|
- echo 'aps upgrade'
|
||||||
-+ echo
|
- echo
|
||||||
-+ echo 'To remove local packages, do:'
|
- }
|
||||||
-+ echo 'aps remove'
|
-+local_installed_list(){ # --- local installed list
|
||||||
-+ echo
|
-+ ls ${installed_pkg_database}
|
||||||
-+ echo 'To upgrade repos, do:'
|
|
||||||
-+ echo 'aps upgrade'
|
|
||||||
-+ echo
|
|
||||||
-+}
|
-+}
|
||||||
-+main() { # --- does soem stuff
|
- main() { # --- does soem stuff
|
||||||
- if [ -f "${lock}" ]; then
|
- if [ -f "${lock}" ]; then
|
||||||
- echo "[E] A lock file already exists. If you're sure no package manager is running, remove the file ${lock}."
|
- echo "[E] A lock file already exists. If you're sure no package manager is running, remove the file ${lock}."
|
||||||
- exit 1
|
-@@ -146,7 +149,8 @@ main() { # --- does soem stuff
|
||||||
-@@ -131,6 +146,7 @@ main() {
|
|
||||||
- [ -z "${2}" ] && die "[*] No targets specified."
|
- [ -z "${2}" ] && die "[*] No targets specified."
|
||||||
- install_package_from_repo "official" "${2}" ;;
|
- install_package_from_repo "official" "${2}" ;;
|
||||||
- upgrade) upgrade "official" ;;
|
- upgrade) upgrade "official" ;;
|
||||||
-+ help) help
|
-- help) help
|
||||||
|
-+ help) help ;;
|
||||||
|
-+ list) local_installed_list ;;
|
||||||
- *) die "[E] Invalid option ${1}, exiting..." ;;
|
- *) die "[E] Invalid option ${1}, exiting..." ;;
|
||||||
- esac
|
- esac
|
||||||
- rm "${lock}"
|
- rm "${lock}"
|
||||||
|
-diff --git a/patch b/patch
|
||||||
|
-index 890bc1b..e69de29 100644
|
||||||
|
---- a/patch
|
||||||
|
-+++ b/patch
|
||||||
|
-@@ -1,79 +0,0 @@
|
||||||
|
--diff --git a/aps b/aps
|
||||||
|
--index d7a4466..42918d3 100644
|
||||||
|
----- a/aps
|
||||||
|
--+++ b/aps
|
||||||
|
--@@ -12,6 +12,7 @@ die() {
|
||||||
|
-- exit 2
|
||||||
|
-- }
|
||||||
|
-- run_package_script() { # --- $2 is the package path, and $1 is the script to run
|
||||||
|
--+ # --- RPS installs to root
|
||||||
|
-- {
|
||||||
|
-- if [ -x "${2}/${1}" ]; then
|
||||||
|
-- echo ":: Running ${1}"
|
||||||
|
--@@ -20,7 +21,7 @@ run_package_script() { # --- $2 is the package path, and $1 is the script to run
|
||||||
|
-- fi
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
---install_local_package() {
|
||||||
|
--+install_local_package() { # --- Install-Local-Package install package LOCALLY!
|
||||||
|
-- [ ! -e "${1}" ] && die "[E] File ${1} does not exist. Exiting..."
|
||||||
|
-- # Extract the package
|
||||||
|
-- echo "[*] Copying package ${1} into temporary location ${temp_location}..."
|
||||||
|
--@@ -69,7 +70,7 @@ install_local_package() {
|
||||||
|
-- unset pkg_config_makedepends
|
||||||
|
-- unset pkg_config_depends
|
||||||
|
-- }
|
||||||
|
---remove_local_package() {
|
||||||
|
--+remove_local_package() { # --- Removes local packges
|
||||||
|
-- pkg_path="${installed_pkg_database}/${1}"
|
||||||
|
-- [ ! -d "${pkg_path}" ] && die "Package could not be found in local installed package database. Exiting..."
|
||||||
|
-- payloadfiles_path="${pkg_path}/payloadfiles"
|
||||||
|
--@@ -79,7 +80,7 @@ remove_local_package() {
|
||||||
|
-- rm -rv "${pkg_path}"
|
||||||
|
-- echo "[*] Removal complete for target ${pkg_name}"
|
||||||
|
-- }
|
||||||
|
---sync_local_repo_database() {
|
||||||
|
--+sync_local_repo_database() { # --- syncs to local repo databese
|
||||||
|
-- echo ":: Syncing local database for repo ${1}..."
|
||||||
|
-- if [ ! -d "${locpkg_database}/${1}" ]; then
|
||||||
|
-- echo ":: Local database for repo ${1} does not exist, cloning..."
|
||||||
|
--@@ -95,7 +96,7 @@ install_package_from_repo() { # NOTE(hippoz): This can get a tad confusing... ${
|
||||||
|
-- [ ! -d "${locpkg_database}/${1}/${2}" ] && die "[E] Target not found."
|
||||||
|
-- install_local_package "${locpkg_database}/${1}/${2}"
|
||||||
|
-- }
|
||||||
|
---upgrade() {
|
||||||
|
--+upgrade() { # --- upgrades
|
||||||
|
-- echo ":: Upgrading installed packages..."
|
||||||
|
-- unset_config_values
|
||||||
|
-- cd "${installed_pkg_database}" || die "Could not enter installed package database. Exiting..."
|
||||||
|
--@@ -117,7 +118,21 @@ upgrade() {
|
||||||
|
-- unset pkg_config_depends
|
||||||
|
-- done
|
||||||
|
-- }
|
||||||
|
---main() {
|
||||||
|
--+help(){
|
||||||
|
--+ echo 'To install locally, do:'
|
||||||
|
--+ echo 'aps install'
|
||||||
|
--+ echo
|
||||||
|
--+ echo 'To install from repo (synchronize), do:'
|
||||||
|
--+ echo 'aps sync'
|
||||||
|
--+ echo
|
||||||
|
--+ echo 'To remove local packages, do:'
|
||||||
|
--+ echo 'aps remove'
|
||||||
|
--+ echo
|
||||||
|
--+ echo 'To upgrade repos, do:'
|
||||||
|
--+ echo 'aps upgrade'
|
||||||
|
--+ echo
|
||||||
|
--+}
|
||||||
|
--+main() { # --- does soem stuff
|
||||||
|
-- if [ -f "${lock}" ]; then
|
||||||
|
-- echo "[E] A lock file already exists. If you're sure no package manager is running, remove the file ${lock}."
|
||||||
|
-- exit 1
|
||||||
|
--@@ -131,6 +146,7 @@ main() {
|
||||||
|
-- [ -z "${2}" ] && die "[*] No targets specified."
|
||||||
|
-- install_package_from_repo "official" "${2}" ;;
|
||||||
|
-- upgrade) upgrade "official" ;;
|
||||||
|
--+ help) help
|
||||||
|
-- *) die "[E] Invalid option ${1}, exiting..." ;;
|
||||||
|
-- esac
|
||||||
|
-- rm "${lock}"
|
||||||
|
|
Loading…
Reference in a new issue