use new git url

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

View file

@ -6,7 +6,7 @@ Install
To install the latest release on Linux run: To install the latest release on Linux run:
curl https://git.0x2620.org/openmedialibrary.git/HEAD:/install | python3 curl https://code.0x2620.org/0x2620/openmedialibrary.git/HEAD:/install | python3
on Mac OS X download this: on Mac OS X download this:
@ -25,7 +25,7 @@ Now checkout the source and prepare for use:
mkdir openmedialibrary mkdir openmedialibrary
cd openmedialibrary cd openmedialibrary
git clone https://git.0x2620.org/openmedialibrary.git git clone https://code.0x2620.org/0x2620/openmedialibrary.git
ln -s openmedialibrary/ctl ctl ln -s openmedialibrary/ctl ctl
./ctl init ./ctl init
@ -36,17 +36,16 @@ To update to latest version:
./ctl update ./ctl update
On Linux you need a working python3.6 installation with pillow, python-lxml, pyOpenSSL and pyCrypto and popler-utils: On Linux you need a working python3.7 installation with pillow, python-lxml, pyOpenSSL and pyCrypto and popler-utils:
apt-get install python3.6 python3-pil python3-lxml \ apt-get install python3 python3-pil python3-lxml \
python3-openssl python3-crypto poppler-utils \ python3-openssl python3-crypto poppler-utils
libevent-2.0-5
Platform Platform
---------- ----------
If you install Open Media Library on a architecture/os that is currently If you install Open Media Library on a architecture/os that is currently
not supported, you need a working python 3.6 installation and the dependencies not supported, you need a working python 3.7 installation and the dependencies
listed in requirements.txt and requirements-shared.txt: listed in requirements.txt and requirements-shared.txt:
pip3 install -r requirements.txt pip3 install -r requirements.txt

15
ctl
View file

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

View file

@ -159,14 +159,14 @@ def command_update_static(*args):
if os.path.exists(old_oxjs) and not os.path.exists(oxjs): if os.path.exists(old_oxjs) and not os.path.exists(oxjs):
shutil.move(old_oxjs, oxjs) shutil.move(old_oxjs, oxjs)
if not os.path.exists(oxjs): if not os.path.exists(oxjs):
r('git', 'clone', '--depth', '1', 'https://git.0x2620.org/oxjs.git', oxjs) r('git', 'clone', '--depth', '1', 'https://code.0x2620.org/0x2620/oxjs.git', oxjs)
elif os.path.exists(os.path.join(oxjs, '.git')): elif os.path.exists(os.path.join(oxjs, '.git')):
os.system('cd "%s" && git pull' % oxjs) os.system('cd "%s" && git pull' % oxjs)
r('python3', os.path.join(oxjs, 'tools', 'build', 'build.py'), '-nogeo') r('python3', os.path.join(oxjs, 'tools', 'build', 'build.py'), '-nogeo')
utils.update_static() utils.update_static()
reader = os.path.join(settings.base_dir, '..', 'reader') reader = os.path.join(settings.base_dir, '..', 'reader')
if not os.path.exists(reader): if not os.path.exists(reader):
r('git', 'clone', '--depth', '1', 'https://git.0x2620.org/openmedialibrary_reader.git', reader) r('git', 'clone', '--depth', '1', 'https://code.0x2620.org/0x2620/openmedialibrary_reader.git', reader)
elif os.path.exists(os.path.join(reader, '.git')): elif os.path.exists(os.path.join(reader, '.git')):
os.system('cd "%s" && git pull' % reader) os.system('cd "%s" && git pull' % reader)