aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/curlpkg
diff options
context:
space:
mode:
authorkj-sh6042025-06-10 13:32:36 -0400
committerkj-sh6042025-06-10 13:32:36 -0400
commitd55248989fe4aa8b7c6f5d06ac8a89b66ba3aba8 (patch)
treeb86e16f5a611246ba6740d7c3e9331a5b2cf38eb /.local/bin/curlpkg
parent3eceaf30b0bfeb617e74275d15e41c0939fecd61 (diff)
refactor: multiple changes (see description)
* add LICENSEs where necesary * remove *pkg scripts from repo see: https://github.com/kj-sh604/gitpkg * rename .local/src python directories * update .local/bin scripts in relation to above
Diffstat (limited to '.local/bin/curlpkg')
-rwxr-xr-x.local/bin/curlpkg60
1 files changed, 0 insertions, 60 deletions
diff --git a/.local/bin/curlpkg b/.local/bin/curlpkg
deleted file mode 100755
index 5b48b7f..0000000
--- a/.local/bin/curlpkg
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-check_curl_installed() {
- if ! command -v curl >/dev/null 2>&1; then
- echo "error: curl is not installed :( please install curl to use curlpkg."
- exit 1
- fi
-}
-
-_base_url='https://aur.archlinux.org/cgit/aur.git/snapshot'
-
-get_url_function() {
- _pkg="$1"
- _url="${_base_url}/${_pkg}.tar.gz"
-
- echo "$_url"
-}
-
-run_curlpkg_function() {
- _pkg="$(echo "$1" | tr -d '[:space:]')"
- _url="$(get_url_function "$_pkg")"
-
- curl -sSL "$_url" -o "${_pkg}.tar.gz"
-}
-
-curlpkg_function() {
- for _pkg in "$@"; do
- run_curlpkg_function "$_pkg" &
- done
- wait
-}
-
-usage_function() {
- cat <<EOF
-Usage:
- curlpkg [-h|--help]
- curlpkg <pkg> <pkg>...
-
-Options:
- -h, --help
- print this help message
-EOF
-}
-
-check_curl_installed
-
-while [ $# -gt 0 ]; do
- case "$1" in
- -*)
- usage_function
- exit 0
- ;;
- *)
- curlpkg_function "$@"
- exit 0
- ;;
- esac
-done
-
-# vim: set filetype=sh foldmethod=marker foldlevel=0: