You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
452 B

#!/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