diff --git a/README.md b/README.md index 0c94025..0bab8f2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Install 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: @@ -25,7 +25,7 @@ Now checkout the source and prepare for use: mkdir 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 ./ctl init @@ -36,17 +36,16 @@ To update to latest version: ./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 \ - python3-openssl python3-crypto poppler-utils \ - libevent-2.0-5 + apt-get install python3 python3-pil python3-lxml \ + python3-openssl python3-crypto poppler-utils Platform ---------- 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: pip3 install -r requirements.txt diff --git a/ctl b/ctl index 2a724b1..c67268d 100755 --- a/ctl +++ b/ctl @@ -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` diff --git a/oml/commands.py b/oml/commands.py index af29d86..7e0a05d 100644 --- a/oml/commands.py +++ b/oml/commands.py @@ -159,14 +159,14 @@ def command_update_static(*args): if os.path.exists(old_oxjs) and not os.path.exists(oxjs): shutil.move(old_oxjs, 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')): os.system('cd "%s" && git pull' % oxjs) r('python3', os.path.join(oxjs, 'tools', 'build', 'build.py'), '-nogeo') utils.update_static() reader = os.path.join(settings.base_dir, '..', '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')): os.system('cd "%s" && git pull' % reader)