David Blume commited on 2019-05-03 00:17:09
Showing 1 changed files, with 9 additions and 3 deletions.
... | ... |
@@ -27,6 +27,7 @@ if [[ $(uname -s) == CYGWIN* ]]; then |
27 | 27 |
PATH=/usr/local/bin:/usr/bin:$PATH |
28 | 28 |
PATH=${PATH//":/usr/local/bin:/usr/bin"/} # delete any instances in middle |
29 | 29 |
add_to_path /usr/lib/lapack |
30 |
+ export GIT_SSH=/cygdrive/c/cygwin64/bin/ssh |
|
30 | 31 |
ulimit -n 1024 # for "duplicity" |
31 | 32 |
fi |
32 | 33 |
|
... | ... |
@@ -68,13 +69,18 @@ alias clip="expand | cut -b1-\$COLUMNS" |
68 | 69 |
alias https='http --default-scheme=https' |
69 | 70 |
|
70 | 71 |
md() { |
71 |
- if [[ $(uname -s) == Darwin* ]]; then |
|
72 |
+ local sys_name=$(uname -s) |
|
73 |
+ if [[ $sys_name == Darwin* ]]; then |
|
72 | 74 |
T=$(mktemp $TMPDIR$(uuidgen).html) |
73 |
- curl -X POST --data-binary @"$1" https://md.dlma.com/ > $T |
|
75 |
+ curl -s -X POST --data-binary @"$1" https://md.dlma.com/ > $T |
|
74 | 76 |
open -a /Applications/Safari.app $T |
77 |
+ elif [[ $sys_name == CYGWIN* ]]; then |
|
78 |
+ T=$(mktemp --suffix=.html) |
|
79 |
+ curl -s -X POST --data-binary @"$1" https://md.dlma.com/ > $T |
|
80 |
+ cygstart $T |
|
75 | 81 |
else |
76 | 82 |
T=$(mktemp --suffix=.html) |
77 |
- curl -X POST --data-binary @"$1" https://md.dlma.com/ > $T |
|
83 |
+ curl -s -X POST --data-binary @"$1" https://md.dlma.com/ > $T |
|
78 | 84 |
xdg-open $T |
79 | 85 |
fi |
80 | 86 |
} |
81 | 87 |