Article 5JNZK Adding to $PATH

Adding to $PATH

by
iicapn
from LinuxQuestions.org on (#5JNZK)
I'm trying to download some software and add the bin folder to the PATH using a bash script. The version of the software updates periodically. Right now I have this:

Code:cd /tmp
wget https://example.com/app-62.3-x86_64-linux-gnu.tar.gz
tar -xvzf app*.gz
rm app*.gz
mv app* /opt
PATH=$PATH:/opt/app-62.3/binBut I'm getting hung up on the last line... I tried using a wildcard in the PATH, but that doesn't seem to work.

My next idea is to, after the untar line, read the exact directory name, then add that to the PATH, but I'm not sure how to do that.

Many thanks to all in advance :-)latest?d=yIl2AUoC8zA latest?i=GUUrT6OzIxc:AuRE28IHuE4:F7zBnMy latest?i=GUUrT6OzIxc:AuRE28IHuE4:V_sGLiP latest?d=qj6IDK7rITs latest?i=GUUrT6OzIxc:AuRE28IHuE4:gIN9vFwGUUrT6OzIxc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments