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
This commit is contained in:
23
.scripts/rsync_laptop_to_phone.sh
Executable file
23
.scripts/rsync_laptop_to_phone.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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
|
Reference in New Issue
Block a user