mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-04-07 14:06:31 +08:00
32 lines
563 B
Bash
Executable File
32 lines
563 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT=$(readlink -f "$0" || grealpath "$0")
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
|
|
|
REPO_NAME=$1
|
|
|
|
source ./scripts/config_value branch OO_BRANCH master
|
|
source ./scripts/config_value git-protocol OO_GIT_PR https
|
|
|
|
echo "$OO_BRANCH"
|
|
|
|
OO_REPO_URL="https://github.com/ONLYOFFICE/$REPO_NAME.git"
|
|
if [ "$OO_GIT_PR" == "ssh" ]
|
|
then
|
|
OO_REPO_URL="git@github.com:ONLYOFFICE/$REPO_NAME.git"
|
|
fi
|
|
|
|
curdir=$PWD
|
|
cd "$SCRIPTPATH/../../"
|
|
|
|
if [ ! -d "./$REPO_NAME" ]
|
|
then
|
|
git clone "$OO_REPO_URL"
|
|
fi
|
|
|
|
cd "$REPO_NAME"
|
|
git checkout -f $OO_BRANCH
|
|
git pull
|
|
|
|
cd "$curdir"
|