mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
Add install-dust, sync_to_protondrive
This commit is contained in:
parent
6efeee8ca9
commit
9aa99b5d23
11
justfile
11
justfile
@ -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
24
sync_to_protondrive
Executable 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
|
Loading…
Reference in New Issue
Block a user