Change script to use symlink
This commit is contained in:
parent
2054234e0f
commit
4280d36e6c
4
share.sh
4
share.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue