#! /bin/sh # create an opengist file and push it to the server # # alexlehm/at/gmail.com TMP=git.gist.$$ mkdir $TMP cp $1 $TMP/ cd $TMP git init git config credential.helper store git add . git commit -m "automatic upload" # if default branch is main, change to master, otherwise we confuse opengist git branch master git checkout master git remote add origin https://alexlehm@gist.tilde.green/init git push -u origin master cd .. rm -rf $TMP