aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update-everything.sh26
-rwxr-xr-xbin/update-packer-to15
-rwxr-xr-xbin/update-scripts-repo.sh5
3 files changed, 23 insertions, 23 deletions
diff --git a/bin/update-everything.sh b/bin/update-everything.sh
index 5bced73..c6b4798 100755
--- a/bin/update-everything.sh
+++ b/bin/update-everything.sh
@@ -9,7 +9,6 @@
# printf_accross_width
# local_update
# remote_update
-# non_free_update
# pip_update
# update_scripts_repo
# update_whatis_db
@@ -53,23 +52,10 @@ remote_update(){
printf_n_notify "remote update"
- ansible-playbook --inventory-file "$HOME/workbench/ansible/hosts" \
- "$HOME/workbench/ansible/update_adjutor.yml"
-
-}
-
-
-# Update non-free xbps packages
-non_free_update(){
-
- printf_n_notify "non-free update"
-
- pushd ~/workbench/auto-void-packages || exit 1
- ./update-git-repo.sh
- cd ../void-packages || exit 1
- ./xbps-src pkg discord && $xi --repository=hostdir/binpkgs/nonfree discord
- ./xbps-src pkg vagrant && $xi --repository=hostdir/binpkgs/nonfree vagrant
- popd || exit 1
+ export ANSIBLE_CONFIG="$HOME/workbench/homelab-iac/ansible/ansible.cfg"
+ ansible-playbook -v -b \
+ --inventory "$HOME/workbench/homelab-iac/ansible/inventory.yaml" \
+ "$HOME/workbench/homelab-iac/ansible/playbooks/update_system.yml"
}
@@ -79,6 +65,8 @@ pip_update(){
printf_n_notify "pip update"
+ "$HOME/workbench/pyvenv/bin/pip3" install --upgrade pip
+
"$HOME/workbench/pyvenv/bin/pip3" list --outdated --format=json | \
jq -r '.[] | "\(.name)==\(.latest_version)"' | \
xargs -n1 "$HOME/workbench/pyvenv/bin/pip3" install --upgrade
@@ -114,8 +102,6 @@ local_update
printf_accross_width "%"
remote_update
printf_accross_width "%"
-non_free_update
-printf_accross_width "%"
pip_update
printf_accross_width "%"
update_scripts_repo
diff --git a/bin/update-packer-to b/bin/update-packer-to
new file mode 100755
index 0000000..622f139
--- /dev/null
+++ b/bin/update-packer-to
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+# clyhtsuriva
+
+VER=$1
+
+pushd /tmp/ || exit
+
+curl -LO "https://releases.hashicorp.com/packer/${VER}/packer_${VER}_linux_amd64.zip" && \
+unzip "packer_${VER}_linux_amd64.zip" && \
+rm LICENSE.txt && \
+mv packer ~/.local/bin/packer && \
+packer -v && \
+rm "packer_${VER}_linux_amd64.zip"
+
+popd || exit
diff --git a/bin/update-scripts-repo.sh b/bin/update-scripts-repo.sh
index 03a20ee..22e0807 100755
--- a/bin/update-scripts-repo.sh
+++ b/bin/update-scripts-repo.sh
@@ -7,9 +7,8 @@ pushd "$SCRIPTS_REPO_PATH" || exit 1
cp -rv "$HOME/.local/usr/local/bin" .
cp -rv "$HOME/workbench/auto-void-packages" .
-cp -rv "$HOME/workbench/ansible" .
-git status | less && git diff | less
-git add . && git commit && git push -v --progress
+git status | less
+git add --patch . && git commit -v && git push -v --progress
popd || exit 1