mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
Init
This commit is contained in:
24
shell/sync_all.sh
Executable file
24
shell/sync_all.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user