Add clone script and shared bash script config

This commit is contained in:
Petr Mrázek 2017-03-02 23:39:20 +01:00
parent a18918a7c7
commit 000c88bbc6
3 changed files with 23 additions and 2 deletions

17
clone.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
BASEDIR=$(dirname "$0")
cd "${BASEDIR}"
BASEDIR=`pwd`
source config.sh
set -x
if [ ! -d "${UPSTREAM_DIR}" ]; then
git clone ${UPSTREAM_REPO} ${UPSTREAM_DIR}
fi
if [ ! -d "${MMC_DIR}" ]; then
git clone ${MMC_REPO} ${MMC_DIR}
fi

5
config.sh Normal file
View File

@ -0,0 +1,5 @@
export UPSTREAM_DIR=mojang
export UPSTREAM_REPO=git@github.com:MultiMC/meta-upstream.git
export MMC_DIR=multimc
export MMC_REPO=git@github.com:MultiMC/meta-multimc.git

View File

@ -6,8 +6,7 @@ BASEDIR=`pwd`
set -x
export UPSTREAM_DIR=mojang
export MMC_DIR=multimc
source config.sh
function fail {
git reset --hard HEAD