diff --git a/.example.env b/.example.env new file mode 100644 index 0000000..f8c9426 --- /dev/null +++ b/.example.env @@ -0,0 +1,2 @@ +UA_NET_ID=your_net_id # first initial + last name +LECTURA_PASSWORD=your_password \ No newline at end of file diff --git a/.gitignore b/.gitignore index 28a4c54..12949b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.env tests/**/skip*.sm* **repo-link.txt diff --git a/connect-lectura b/connect-lectura new file mode 100755 index 0000000..edae70a --- /dev/null +++ b/connect-lectura @@ -0,0 +1,20 @@ +#!/bin/bash + +source ./.env + +if [ -z $UA_NET_ID ]; then + echo "Set UA_NET_ID in .env" + exit 1 +fi + +if [ -z $LECTURA_PASSWORD ]; then + echo "Set LECTURA_PASSWORD in .env" + exit 1 +fi + +# Copy lectura password to clipboard +echo $LECTURA_PASSWORD | clipboard + +echo -e "\nPassword copied to clipboard" +echo "Connecting to lectura..." +ssh $UA_NET_ID@lectura.cs.arizona.edu \ No newline at end of file diff --git a/install b/install old mode 100644 new mode 100755 diff --git a/start-wiki b/start-wiki old mode 100644 new mode 100755 diff --git a/submit-lectura b/submit-lectura new file mode 100755 index 0000000..56869df --- /dev/null +++ b/submit-lectura @@ -0,0 +1,25 @@ +#!/bin/bash + +source ./.env + +if [ -z $1 ]; then + echo "No file provided" + exit 1 +fi + +if [ ! -f $1 ]; then + echo "File does not exist" + exit 1 +fi + +if [ -z $LECTURA_PASSWORD ]; then + echo "Set LECTURA_PASSWORD in .env" + exit 1 +fi + +# Copy lectura password to clipboard +echo $LECTURA_PASSWORD | clipboard + +echo -e "\nPassword copied to clipboard" + +scp $1 $UA_NET_ID@lectura.cs.arizona.edu:~/submit-lectura \ No newline at end of file diff --git a/test-compile b/test-compile old mode 100644 new mode 100755