mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
25 lines
431 B
Bash
Executable File
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"
|