aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2023-04-22 23:18:11 +0500
committerAnton Bobov <anton@bobov.name>2023-04-22 23:18:11 +0500
commit957efa8e4d19d4f887526acd87e18e065067c877 (patch)
treea9d1f2d66b7c595df33baf66f6fb90e084fbb658
parentf9a2b5229a4dd6d9cd392c57643124aeb7be15d6 (diff)
Added eget script
-rw-r--r--files/.eget.toml14
-rw-r--r--files/.zsh/rc/S20_eget33
-rw-r--r--install.conf.yaml7
3 files changed, 51 insertions, 3 deletions
diff --git a/files/.eget.toml b/files/.eget.toml
new file mode 100644
index 0000000..99f1fbb
--- /dev/null
+++ b/files/.eget.toml
@@ -0,0 +1,14 @@
+[global]
+target = "~/.local/bin"
+upgrade_only = true
+
+["zyedidia/eget"]
+
+["antonmedv/fx"]
+
+["docker/compose"]
+target = "~/.local/bin/docker-compose"
+
+["jesseduffield/lazygit"]
+
+["pypa/pipx"]
diff --git a/files/.zsh/rc/S20_eget b/files/.zsh/rc/S20_eget
new file mode 100644
index 0000000..09eef28
--- /dev/null
+++ b/files/.zsh/rc/S20_eget
@@ -0,0 +1,33 @@
+function () {
+ EGET_LOCATION="$HOME/.local/bin/eget"
+
+ if [ ! -x "$EGET_LOCATION" ] ; then
+ function eget() {
+ local EGET_SCRIPT_URL="https://zyedidia.github.io/eget.sh"
+ local EGET_SCRIPT_CHECKSUM="0e64b8a3c13f531da005096cc364ac77835bda54276fedef6c62f3dbdc1ee919"
+ vared -p 'No eget found, install it?: (y/N) ' -c answer
+ case "$answer" in
+ y|Y)
+ unset -f eget
+ temp_file=$(mktemp)
+ trap 'rm -f "$temp_file"' EXIT
+ curl -o "$temp_file" "$EGET_SCRIPT_URL"
+ echo "$EGET_SCRIPT_CHECKSUM $temp_file" | shasum --algorithm 256 --check --quiet
+ (cd $(dirname "$EGET_LOCATION") && sh "$temp_file")
+ ;;
+ *)
+ return
+ ;;
+ esac
+ answer=""
+ vared -p 'Download all by eget?: (y/N) ' -c answer
+ case "$answer" in
+ y|Y)
+ eget --download-all
+ ;;
+ esac
+ }
+ fi
+}
+
+# vim: ft=zsh
diff --git a/install.conf.yaml b/install.conf.yaml
index 25fb0a3..78105e2 100644
--- a/install.conf.yaml
+++ b/install.conf.yaml
@@ -11,14 +11,15 @@
- link:
~/.aria2: files/.aria2
~/.editorconfig: files/.editorconfig
- ~/.mpv: files/.mpv
- ~/.ssh: files/.ssh
+ ~/.eget.toml: files/.eget.toml
~/.lessfilter.sh: files/.lessfilter.sh
+ ~/.mpv: files/.mpv
~/.psqlrc: files/.psqlrc
+ ~/.reminders: files/.reminders
+ ~/.ssh: files/.ssh
~/.task: files/.task
~/.taskrc: files/.taskrc
~/.vit: files/.vit
- ~/.reminders: files/.reminders
~/.xsessionrc: files/.xsessionrc
# Git
~/.gitconfig: files/.gitconfig