Creating a fairly simple bash script to automate some stuff.
It contains this line:
valet link --secure $FOLDER
But the linking process is quite slow (and I don’t need to do it everytime I run this script). Is there a way to get the $FOLDER
value, and see if the Path value is the same? If it is different, perform the link action, otherwise do not.
The results of valet links
looks like this:
So comparing PATH seems to be the way to go?
Copilot spit out the below code, but it does not work.
if ! valet links | grep -q $FOLDER; then
valet link --secure $FOLDER
fi
1