forked from OpenRCT2/Localisation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge.sh
36 lines (30 loc) · 899 Bytes
/
merge.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# Automatic bash script to merge the latest changes from OpenRCT2/Localisation
# into OpenRCT2/OpenRCT2.
echo "Merge Localisation into OpenRCT2."
# Clone repositories
echo "Cloning repositories."
git clone -b master git@github.com:OpenRCT2/Localisation.git Localisation
git clone -b develop git@github.com:OpenRCT2/OpenRCT2.git OpenRCT2
# Copy over language files
echo "Copying language files"
for f in ./Localisation/data/language/*
do
filename=$(basename $f)
cp $f "./OpenRCT2/data/language/$filename"
done
# Commit and push
pushd ./OpenRCT2
if [[ $(git status -s) ]]; then
echo "Committing and pushing..."
git add .
git commit -m "Merge Localisation/master into OpenRCT2/develop."
git push
echo "Complete"
else
echo "No changes to merge."
fi
popd
# Remove files
rm -rf ./OpenRCT2
rm -rf ./Localisation