Last active 1725560370

create an opengist via shell

Revision 54eeac96141baa74873d59da67763ce0e069a1c7

opengist.sh Raw
1#! /bin/sh
2
3# create an opengist file and push it to the server
4#
5# alexlehm/at/gmail.com
6
7TMP=git.gist.$$
8
9mkdir $TMP
10
11cp $1 $TMP/
12
13cd $TMP
14git init
15git config credential.helper store
16git add .
17git commit -m "automatic upload"
18# if default branch is main, change to master, otherwise we confuse opengist
19git branch master
20git checkout master
21git remote add origin https://alexlehm@gist.tilde.green/init
22git push -u origin master
23
24cd ..
25rm -rf $TMP
26