Initial shellrc commit.

This commit is contained in:
rto
2026-05-06 11:49:16 +02:00
commit ac1525c172
6 changed files with 259 additions and 0 deletions
Executable
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
MAP_FILE=".sync-map"
if [ ! -f "$MAP_FILE" ]; then
echo "No .sync-map found"
exit 1
fi
echo "Syncing external files INTO repo..."
while IFS=: read -r src dest
do
eval source_file="$src"
eval dest_file="$dest"
# skip empty or comment lines
[ -z "$source_file" ] && continue
case "$source_file" in \#*) continue ;; esac
if [ ! -f "$source_file" ]; then
echo "Missing external file: $source_file"
exit 1
fi
mkdir -p "$(dirname "$dest_file")"
cp "${source_file}" "$dest_file"
git add "$dest_file"
echo "Copied + staged: $dest_file"
done < "$MAP_FILE"
echo "Done syncing IN"