Skip to content

Commit

Permalink
Review and linting suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
wetneb committed Nov 14, 2024
1 parent a776ab7 commit 651fb4d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/scripts/merge_tools/mergiraf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ SCRIPT_PATH="$(dirname "$0")"; SCRIPT_PATH="$(eval "cd \"$SCRIPT_PATH\" && pwd")
ROOT_PATH="$(realpath "${SCRIPT_PATH}/../../../")"
mergiraf_relativepath=bin/mergiraf
mergiraf_absolutepath="${ROOT_PATH}/${mergiraf_relativepath}"
mkdir -p ${ROOT_PATH}/bin
mkdir -p "${ROOT_PATH}/bin"

if [ ! -e $mergiraf_absolutepath ]; then
if [ ! -e "$mergiraf_absolutepath" ]; then
ARCH=$(uname -m)
if [[ "$ARCH" == x86_64* ]]; then
ARCH="x86_64"
elif [[ "$ARCH" == i*86 ]]; then
echo "No mergiraf binaries for architecture $ARCH"
exit 2
elif [[ "$ARCH" == arm* ]]; then
ARCH="aarch64"
else
echo "No mergiraf binaries for architecture $ARCH"
exit 2
fi
if [[ $OSTYPE == 'darwin'* ]]; then
VENDOR="apple-darwin"
Expand All @@ -45,9 +45,9 @@ if [ ! -e $mergiraf_absolutepath ]; then
fi
FULL_ARCH="${ARCH}-${VENDOR}"

wget https://codeberg.org/mergiraf/mergiraf/releases/download/v${MERGIRAF_VERSION}/mergiraf_${FULL_ARCH}.tar.gz -O ${ROOT_PATH}/bin/mergiraf.tar.gz
tar -zxf ${ROOT_PATH}/bin/mergiraf.tar.gz -C ${ROOT_PATH}/bin/
rm ${ROOT_PATH}/bin/mergiraf.tar.gz
wget "https://codeberg.org/mergiraf/mergiraf/releases/download/v${MERGIRAF_VERSION}/mergiraf_${FULL_ARCH}.tar.gz" -O "${ROOT_PATH}/bin/mergiraf.tar.gz"
tar -zxf "${ROOT_PATH}/bin/mergiraf.tar.gz" -C "${ROOT_PATH}/bin/"
rm "${ROOT_PATH}/bin/mergiraf.tar.gz"
fi

clone_dir=$1
Expand All @@ -57,8 +57,8 @@ branch2=$3
cd "$clone_dir" || { echo "$0: cannot cd to $clone_dir"; exit 2; }

# set up mergiraf driver
git config --global merge.mergiraf.name mergiraf
git config --global merge.mergiraf.driver "${mergiraf_absolutepath} merge --git %O %A %B -s %S -x %X -y %Y -p %P"
git config merge.mergiraf.name mergiraf
git config merge.mergiraf.driver "${mergiraf_absolutepath} merge --git %O %A %B -s %S -x %X -y %Y -p %P"
$(mergiraf_absolutepath) languages --gitattributes >> .gitattributes

# perform merge
Expand Down

0 comments on commit 651fb4d

Please sign in to comment.