mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

initprivgit (434B)


      1 #!/bin/bash
      2 
      3 set -e
      4 
      5 REPO="$1"
      6 REPO_FILTER="${1//\//_}" # replace / by _
      7 
      8 ssh privgit git init --bare git/${REPO_FILTER}.git
      9 cd ~/git
     10 # create parent directories
     11 mkdir -p "$REPO"; rmdir "$REPO"
     12 git clone privgit:git/${REPO_FILTER}.git "$REPO"
     13 cd "$HOME/git/$REPO"
     14 touch init
     15 git add init
     16 git commit -m init init
     17 git rm init
     18 git commit -m init .
     19 git push
     20 mr reg
     21 cd ~/config/private
     22 git pull
     23 git commit -m 'mrconfig' mrconfig
     24 git push
     25