Skip to content

Instantly share code, notes, and snippets.

@bkj
Last active August 8, 2018 13:30
Show Gist options
  • Save bkj/095934cbfe0ae8ebadeece1f5929e21a to your computer and use it in GitHub Desktop.
Save bkj/095934cbfe0ae8ebadeece1f5929e21a to your computer and use it in GitHub Desktop.
#!/bin/bash
# sdh-init.sh
# --
# Set current repo name (on github) and target repo name (on gitlab.sdh.cloud)
REPO_NAME="bhtsne"
REPO_URL="https://github.com/lvdmaaten/bhtsne"
TARGET_NAME="bhtsne"
# clone repo
git clone $REPO_URL
cd $REPO_NAME
# backup master branch
git checkout -b orig
git checkout master
# load credentials for pusing to gitlab
source ../.gitlab_token.sh
# create gitlab repo and push
git push --all --set-upstream https://$GITLAB_USERNAME:[email protected]/sdh-workflows/$TARGET_NAME.git
git remote add gitlab https://$GITLAB_USERNAME:[email protected]/sdh-workflows/$TARGET_NAME.git
# clone sdh-skeleton repo + remove its .git directory
git clone https://$GITLAB_USERNAME:[email protected]/bjohnson/sdh-skeleton _sdh
cd _sdh
rm -rf .git
# add sdh-skeleton files to
git add *
git commit -a -m "adding _sdh/*"
git push
# start base docker image
chmod +x start.sh
./start.sh
# ... edit `Dockerfile`, `data.sh` and `run.sh` ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment