Change script to use symlink

This commit is contained in:
Anthony Wang 2021-07-21 11:23:37 -05:00
parent 2054234e0f
commit 4280d36e6c
Signed by: a
GPG key ID: BC96B00AEC5F2D76

View file

@ -4,7 +4,7 @@
echo "Your IP address is "$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
if [ "$#" -eq 1 ]; then
ln "$1" . # Link file to current directory
ln -s "$1" share # Link file to current directory
else
touch share.txt # Create the file
xdg-open share.txt # Open file in default editor
@ -14,4 +14,4 @@ fi
echo "Press Ctrl-C to stop the server when you are done"
python -m http.server
rm share.txt # Delete the file when you are done
rm share share.txt > /dev/null 2>&1 # Delete the file when you are done