Scripting and Global Aliases?

V

Videodrome

Guest
I am interested in Android Development and I've made a script that removes OpenJDK, installs Oracle Java JDK, and also downloads and unzips Android SDK. (all instructions I've read say to use Proprietary Java)

My files go into /opt/java/ and Android can be launched from /opt/java/android-studio/bin/studio.sh to install it and then run it.

I was thinking this script could be more polished or even be something to put on GitHub, but it would be nice if the script handled creating and Alias.

This line seems to work when run as the user, but not at the end of a script run as Root
alias androidsdk=/opt/java/android-studio/bin/studio.sh" >> /etc/profile


I've tried adding and Alias line like this to /etc/profile or /etc/bash.bashrc thinking it would be a global command, but it doesn't seem to work
alias androidsdk=/opt/java/android-studio/bin/studio.sh

Maybe if I set this up as a GitHub project, I'll just include a ReadMe saying to run the alias command separately? I also tried using my script to create the Alias script, but it was ownded by Root, so that wasn't anymore convenient.

Just thought it would be more complete this way, but for now I'm glad I have this script. I'm going to redo my Laptop and I can just run this again to setup fast for Android.
 

Members online


Top