28 lines
607 B
Bash
Executable File
28 lines
607 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
PORTIGNORE_FILE=".portsignore"
|
|
|
|
# Fetch pristine updates
|
|
git checkout main
|
|
git fetch origin pristine
|
|
|
|
# Merge pristine into main
|
|
git merge origin/pristine || {
|
|
echo "⚠️ Merge conflict — cleaning removed ports..."
|
|
|
|
while IFS= read -r port; do
|
|
[ -z "$port" ] && continue
|
|
echo "$port" | grep -q '^#' && continue
|
|
|
|
if [ -e "$port" ]; then
|
|
echo " 🔥 Removing $port"
|
|
git rm -rf "$port"
|
|
fi
|
|
done < "$PORTIGNORE_FILE"
|
|
|
|
#git commit -am "Cleanup after merge: removed ports from .portignore"
|
|
}
|
|
|
|
echo "✅ Merge complete"
|