Help with .sh scripts and global variables
-
Hi, first post so i hope it wont be to bad. I couldnt find answers anywhere i looked online and im fairly new to linux and retropie.
So im using mpg123 for background audio and it works fine, stops when games launch and starts when they close. I made 2 scripts in my desktop roms folder where i have my .sh to start the desktop and they work fine, one stops the music and the other will start/restart the music.
I want to be able to switch the sourse of my music from folder to folder so I have it set an env variable at boot that points to my music selection and i changed my .sh files to use the variable. That all works fine, my problem is.
I made another .sh file to set that variable to point at my other music folder. I run the script but my variable doesn't update. I read online that its setting a local variable so I tried using the export command and it still doesnt update. How could i get my .sh files to set environment variables globaly?
-
You should post your scripts - on pastebin.com - and indicate how you launch each one. Without the source, it's difficult to give any advice.
-
@mitu thank you for your reply, sorry i was distracted for a few days. I didnt figure out how to make variables work but i was able to make a txt file that i could read/write as a varriable so im good now.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.