dotfiles/.scripts/rsync_laptop_to_phone.sh
Sravan Balaji d3a3c62650 Rsync Scripts
- Fix "kilall" to "killall" in scripts
- Add rsync scripts to synchronize from laptop to cloud/external hdd/phone
- Add rsync rofi menu scrip
- Add rsync rofi menu to control center
- Fix spacing issue with gamemode.ini content in README.org
2022-05-18 17:40:34 -04:00

24 lines
490 B
Bash
Executable File

#!/bin/bash
# Define base paths
phone_path="/run/user/1000/b2c922a2358570a6"
home_path="/home/sravan"
# Define arrays
declare -a source_dirs=(
"$home_path/Videos/"
)
declare -a target_dirs=(
"$phone_path/Videos/"
)
# Loop through arrays
for i in ${!source_dirs[@]}; do
# Create target directories
mkdir -p "${target_dirs[$i]}"
# Copy source dirs to target dirs
rsync -a -v -L --progress --delete \
"${source_dirs[$i]}" \
"${target_dirs[$i]}"
done