Good work, this is coming along nicely.
However, I have a few suggestions concerning the scripts:
#1: In the readme it says to use the command line to run the script as root. While this does work, it's not necessary. All commands that are prefixed with "sudo". All the commands in the script that need to be run as root are prefixed with sudo so really you can just double click on the script, and hit run in terminal. Or if you like using the terminal:
OR
#2: If it were me, I'd put in some line breaks and comments to make the script easier to read and edit but that's up to you.
#3:
Relative paths would save you the trouble of typing out the full path names and allow users to successfully run the script in any directory they choose, not just the Desktop. For example, take these two lines:
They work but why type out the full path? We are already in the ~/Desktop/base-plugins directory so all we need is:
Basically the "." just means that we are dealing with a file (or folder in this case) inside the current working directory (which is ~/Desktop/base-plugins). Or it could be ~/Desktop/Documents/Files/base-plugins... It really doesn't matter since the path is relative, not absolute...
#4:
Variables make your scripts easier to maintain and save you typing. For example, since we end up referring to the /usr/lib32/firefox32/plugins directory a lot in the script we could just declare a variable at the beginning:
Now instead of typing "/usr/lib32/firefox32/plugins", we can just type $plugins. Using this variable the previous example could just be:
#5: This isn't really that important but if you want to get rid of the ~"Can't get working directory" error at the end of the script then you can.
This error happens when this command is executed:
The reason is because we are deleting the current working directory. To avoid the error, we just navigate to the parent directory of base-plugins (~/Desktop):
(".." = parent directory)
and then delete base-plugins folder:
Since the current working directory is outside of the base-plugins directory, there is no error.
#6: When you double click on the script and select "Run in Terminal" , it works fine but the terminal always closes RIGHT after the script finishes. To keep the terminal open after the script finishes just include this command at the very end of the file on its own line:
Hope you find (some of
) this info useful,
-sheep
Bookmarks