1
0
Fork 0
mirror of https://github.com/xHyroM/void-packages.git synced 2024-11-23 14:51:06 +01:00
void-packages/common/hypa/sync.sh

35 lines
771 B
Bash
Raw Normal View History

#!/usr/bin/bash
# Check if upstream remote is set
if ! git remote | grep -q upstream; then
git remote add upstream https://github.com/void-linux/void-packages.git
echo "[+] Added upstream remote"
fi
BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "[?] Fetching upstream changes"
git fetch --depth=1 upstream
echo ""
echo "[?] Moving original common/ to tmp/common"
mkdir -p tmp
mv common tmp/common
mv xbps-src tmp/
echo ""
echo "[?] Copying common/ & xbps-src from upstream/master to $BRANCH"
git checkout upstream/master -- common
git checkout upstream/master -- xbps-src
echo ""
echo "[?] Copying tmp/common/hypa to common/hypa"
cp -r tmp/common/hypa common/hypa
echo ""
echo "[?] Removing tmp/ directory"
rm -rf tmp
echo ""
echo "[+] Update completed"