simplified dcss

This commit is contained in:
James Tomasino 2018-12-23 15:42:44 -05:00
parent dfe80994ff
commit 0ebe2f7819
1 changed files with 4 additions and 6 deletions

View File

@ -1,12 +1,10 @@
#!/bin/sh
SOURCEKEY="https://crawl.tildeverse.org/dcss.key"
MYKEY="${HOME}/.ssh/dcss.key"
if [ -f "$MYKEY" ]; then
ssh -i "$MYKEY" dcss@crawl.tildeverse.org
else
if [ ! -f "$MYKEY" ]; then
mkdir -p "${HOME}/.ssh"
curl -s "https://crawl.tildeverse.org/dcss.key" > "$MYKEY"
curl -s "$SOURCEKEY" > "$MYKEY"
chmod 600 "$MYKEY"
ssh -i "$MYKEY" dcss@crawl.tildeverse.org
fi
ssh -i "$MYKEY" dcss@crawl.tildeverse.org