Alexander revised this gist . Go to revision
1 file changed, 53 insertions
opengist(file created)
@@ -0,0 +1,53 @@ | |||
1 | + | #! /bin/sh | |
2 | + | ||
3 | + | # create an opengist file and push it to the server | |
4 | + | # | |
5 | + | # alexlehm/at/gmail.com | |
6 | + | ||
7 | + | TMPDIR=git_gist.$$ | |
8 | + | ||
9 | + | if [ `expr "$1" : "https://"` = 0 ] | |
10 | + | then | |
11 | + | URL=https://alexlehm@gist.tilde.green/init | |
12 | + | mkdir $TMPDIR | |
13 | + | cd $TMPDIR | |
14 | + | git init | |
15 | + | git config credential.helper store | |
16 | + | # if default branch is main, change to master, otherwise we confuse opengist | |
17 | + | git remote add origin $URL | |
18 | + | ||
19 | + | cd .. | |
20 | + | if [ $# = 0 ] | |
21 | + | then | |
22 | + | cat >$TMPDIR/file.txt | |
23 | + | else | |
24 | + | cp $* $TMPDIR/ | |
25 | + | fi | |
26 | + | ||
27 | + | cd $TMPDIR | |
28 | + | git add . | |
29 | + | git commit -a -m "automatic upload" | |
30 | + | git branch master | |
31 | + | git checkout master | |
32 | + | git push -u origin master | |
33 | + | cd .. | |
34 | + | else | |
35 | + | URL=$1 | |
36 | + | shift | |
37 | + | git clone $URL $TMPDIR | |
38 | + | if [ $# = 0 ] | |
39 | + | then | |
40 | + | cat >$TMPDIR/file.txt | |
41 | + | else | |
42 | + | cp $* $TMPDIR/ | |
43 | + | fi | |
44 | + | ||
45 | + | cd $TMPDIR | |
46 | + | git add . | |
47 | + | git commit -a -m "automatic upload" | |
48 | + | git push -u origin master | |
49 | + | cd .. | |
50 | + | fi | |
51 | + | ||
52 | + | rm -rf $TMPDIR/ | |
53 | + |
alexlehm revised this gist . Go to revision
1 file changed, 39 deletions
opengist (file deleted)
@@ -1,39 +0,0 @@ | |||
1 | - | #! /bin/sh | |
2 | - | ||
3 | - | # create an opengist file and push it to the server | |
4 | - | # | |
5 | - | # alexlehm/at/gmail.com | |
6 | - | ||
7 | - | TMPDIR=git.gist.$$ | |
8 | - | ||
9 | - | if [ `expr "$1" : "https://"` = 0 ] | |
10 | - | then | |
11 | - | URL=https://alexlehm@gist.tilde.green/init | |
12 | - | mkdir $TMPDIR | |
13 | - | else | |
14 | - | URL=$1 | |
15 | - | shift | |
16 | - | git clone $URL $TMPDIR | |
17 | - | fi | |
18 | - | ||
19 | - | if [ $# = 0 ] | |
20 | - | then | |
21 | - | cat >$TMPDIR/file.txt | |
22 | - | else | |
23 | - | cp $* $TMPDIR/ | |
24 | - | fi | |
25 | - | ||
26 | - | cd $TMPDIR | |
27 | - | git init | |
28 | - | git config credential.helper store | |
29 | - | git add . | |
30 | - | git commit -m "automatic upload" | |
31 | - | # if default branch is main, change to master, otherwise we confuse opengist | |
32 | - | git branch master | |
33 | - | git checkout master | |
34 | - | git remote add origin $URL | |
35 | - | git push -u origin master | |
36 | - | ||
37 | - | cd .. | |
38 | - | rm -rf $TMPDIR/ | |
39 | - |
Alexander revised this gist . Go to revision
1 file changed, 39 insertions
opengist(file created)
@@ -0,0 +1,39 @@ | |||
1 | + | #! /bin/sh | |
2 | + | ||
3 | + | # create an opengist file and push it to the server | |
4 | + | # | |
5 | + | # alexlehm/at/gmail.com | |
6 | + | ||
7 | + | TMPDIR=git.gist.$$ | |
8 | + | ||
9 | + | if [ `expr "$1" : "https://"` = 0 ] | |
10 | + | then | |
11 | + | URL=https://alexlehm@gist.tilde.green/init | |
12 | + | mkdir $TMPDIR | |
13 | + | else | |
14 | + | URL=$1 | |
15 | + | shift | |
16 | + | git clone $URL $TMPDIR | |
17 | + | fi | |
18 | + | ||
19 | + | if [ $# = 0 ] | |
20 | + | then | |
21 | + | cat >$TMPDIR/file.txt | |
22 | + | else | |
23 | + | cp $* $TMPDIR/ | |
24 | + | fi | |
25 | + | ||
26 | + | cd $TMPDIR | |
27 | + | git init | |
28 | + | git config credential.helper store | |
29 | + | git add . | |
30 | + | git commit -m "automatic upload" | |
31 | + | # if default branch is main, change to master, otherwise we confuse opengist | |
32 | + | git branch master | |
33 | + | git checkout master | |
34 | + | git remote add origin $URL | |
35 | + | git push -u origin master | |
36 | + | ||
37 | + | cd .. | |
38 | + | rm -rf $TMPDIR/ | |
39 | + |
alexlehm revised this gist . Go to revision
1 file changed, 1 insertion, 2 deletions
opengist.sh
@@ -18,9 +18,8 @@ git commit -m "automatic upload" | |||
18 | 18 | # if default branch is main, change to master, otherwise we confuse opengist | |
19 | 19 | git branch master | |
20 | 20 | git checkout master | |
21 | - | git remote add origin http://wormhole.axs.de:6157/init | |
21 | + | git remote add origin https://alexlehm@gist.tilde.green/init | |
22 | 22 | git push -u origin master | |
23 | 23 | ||
24 | 24 | cd .. | |
25 | 25 | rm -rf $TMP | |
26 | - |
alexlehm revised this gist . Go to revision
1 file changed, 0 insertions, 0 deletions
gistfile1.txt renamed to opengist.sh
File renamed without changes
alexlehm revised this gist . Go to revision
1 file changed, 26 insertions
gistfile1.txt(file created)
@@ -0,0 +1,26 @@ | |||
1 | + | #! /bin/sh | |
2 | + | ||
3 | + | # create an opengist file and push it to the server | |
4 | + | # | |
5 | + | # alexlehm/at/gmail.com | |
6 | + | ||
7 | + | TMP=git.gist.$$ | |
8 | + | ||
9 | + | mkdir $TMP | |
10 | + | ||
11 | + | cp $1 $TMP/ | |
12 | + | ||
13 | + | cd $TMP | |
14 | + | git init | |
15 | + | git config credential.helper store | |
16 | + | git add . | |
17 | + | git commit -m "automatic upload" | |
18 | + | # if default branch is main, change to master, otherwise we confuse opengist | |
19 | + | git branch master | |
20 | + | git checkout master | |
21 | + | git remote add origin http://wormhole.axs.de:6157/init | |
22 | + | git push -u origin master | |
23 | + | ||
24 | + | cd .. | |
25 | + | rm -rf $TMP | |
26 | + |