call $0 instead of hardcoded script name

Allows the script to work when called from another directory or if the script name changes.
This commit is contained in:
Kaue Doretto Grecchi 2023-05-31 14:47:15 -03:00 committed by GitHub
parent e3b1fd298a
commit edda041093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ fi
myPARAM="$1"
if [[ $myPARAM =~ ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$ ]];
then
watch --color -n $myPARAM "dps.sh"
watch --color -n $myPARAM "$0"
exit
fi