#!/bin/bash set -eux ## 0k git remote path GIT_0K_BASE=${GIT_0K_BASE:-"0k-ro:/var/git"} ## 0k git remote options GIT_0K_CLONE_OPTIONS=${GIT_0K_CLONE_OPTIONS:-""} ## ## install git sub ## if [ -d /opt/apps/git-sub ]; then cd /opt/apps/git-sub && git pull -r else mkdir -p /opt/apps && cd /opt/apps && git clone $GIT_0K_CLONE_OPTIONS "$GIT_0K_BASE"/0k/git-sub fi ln -sf /opt/apps/git-sub/bin/git-sub /usr/lib/git-core/git-sub