25 lines
559 B
Bash
25 lines
559 B
Bash
#!/bin/bash
|
|
|
|
SOURCE_DIR=../../Modules/Bannerlord.Harmony/bin/Win64_Shipping_Client
|
|
LOG_FILE=symlinks-created.txt
|
|
|
|
> "$LOG_FILE" # Empty the log file
|
|
|
|
for file in "$SOURCE_DIR"/*; do
|
|
base=$(basename "$file")
|
|
if [ ! -e "$base" ]; then
|
|
ln -s "$file" .
|
|
echo "$base" >> "$LOG_FILE"
|
|
echo "Linked: $base"
|
|
else
|
|
if [ -L "$base" ]; then
|
|
echo "$base" >> "$LOG_FILE"
|
|
echo "Skipped (symlink already exists): $base"
|
|
else
|
|
echo "SHOULD NOT HAPPEN"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
echo "Symlinking complete. Reversible via: xargs rm < $LOG_FILE"
|