use new git url

This commit is contained in:
j 2019-01-18 16:18:41 +05:30
commit b9135fd891
3 changed files with 20 additions and 12 deletions

15
ctl
View file

@ -9,6 +9,7 @@ fi
BASE=`pwd`
SYSTEM=`uname -s`
PLATFORM=`uname -m`
GIT_BASE=https://code.0x2620.org/0x2620
PYTHON=python3
@ -90,6 +91,12 @@ hash -r 2>/dev/null
# allow more open files
ulimit -S -n 2048
function update_gitbase() {
if [ -e "${BASE}/openmedialibrary/.git/config" ]; tthen
GIT_BASE=`grep origin .git/config -A 1 | grep url | cut -f2 -d=`
fi
}
if [ "$1" == "start" ]; then
cd "$BASE/$NAME"
if [ -e "$PID" ]; then
@ -183,11 +190,12 @@ if [ "$1" == "ui" ]; then
exit $?
fi
if [ "$1" == "init" ]; then
update_gitbase
if [ ! -e "${BASE}/platform" ]; then
git clone --depth 1 https://code.0x2620.org/0x2620/openmedialibrary_platform.git "${BASE}/platform"
git clone --depth 1 $GIT_BASE/openmedialibrary_platform.git "${BASE}/platform"
fi
if [ ! -e "${PLATFORM_ENV}" ]; then
git clone --depth 1 https://code.0x2620.org/0x2620/openmedialibrary_platform_${PLATFORM}.git "${PLATFORM_ENV}"
git clone --depth 1 $GIT_BASE/openmedialibrary_platform_${PLATFORM}.git "${PLATFORM_ENV}"
fi
cd "${BASE}"
if [ ! -e "${BASE}/ctl" ]; then
@ -199,7 +207,8 @@ fi
if [ "$1" == "update" ]; then
cd "$BASE/$NAME"
if [ ! -e "${PLATFORM_ENV}" ]; then
git clone --depth 1 https://code.0x2620.org/0x2620/openmedialibrary_platform_${PLATFORM}.git "${PLATFORM_ENV}"
update_gitbase
git clone --depth 1 $GIT_BASE/openmedialibrary_platform_${PLATFORM}.git "${PLATFORM_ENV}"
fi
if [ -d "$BASE/$NAME/.git" ]; then
OLD=`"$0" version`