Add install-dust, sync_to_protondrive

This commit is contained in:
Jeffrey Serio 2024-10-27 17:24:58 -05:00
parent 6efeee8ca9
commit 9aa99b5d23
2 changed files with 35 additions and 0 deletions

View File

@ -78,3 +78,14 @@ neovim-root:
sudo mkdir -p /root/.config/nvim
sudo wget https://files.hyperreal.coffee/init.vim -O /root/.config/nvim/init.vim
install-dust:
#!/usr/bin/env bash
set -euo pipefail
dl_url=$(curl -s "https://api.github.com/repos/bootandy/dust/releases/latest" | jq '.assets | .[].browser_download_url' | grep "x86_64-unknown-linux-gnu.tar.gz" | tr -d '"')
wget "$dl_url"
filename=$(basename -s .tar.gz dust*)
tar xvf "${filename}.tar.gz"
sudo cp -v "${filename}/dust" /usr/local/bin/
sudo chown root:root /usr/local/bin/dust
rm -rf "$filename" "${filename}.tar.gz"

24
sync_to_protondrive Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
STAGING_DIR="/home/jas/protonshare"
SHARE_DIRS=(
/home/jas/calibre-library
/home/jas/documents
/home/jas/ebooks
/home/jas/org
/home/jas/org-roam
/home/jas/pictures
)
rm -rf "${STAGING_DIR}"
mkdir -p "${STAGING_DIR}"
for dir in "${SHARE_DIRS[@]}"; do
cp -rfv "$dir" "${STAGING_DIR}/"
done
rclone sync --transfers 8 "${STAGING_DIR:?}/" protondrive:/
exit 0