Files
scripts/shell/sync_all.sh
2025-09-18 11:35:56 +02:00

25 lines
431 B
Bash
Executable File

#!/bin/sh
# Path to the file containing the list of paths
file="$HOME/.syncs"
# Iterate over each line in the file
while IFS= read -r path; do
# Process each path
cd ~/$path
# Check arguments
if [ "$1" = "out" ]; then
echo "Syncing OUT to $path ..."
bash ./sync.sh out
elif [ "$1" = "in" ]; then
echo "Syncing OUT to $path ..."
bash ./sync.sh out
else
echo "Usage: $0 [out|in]"
exit 1
fi
cd ~
done <"$file"