Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
FMods.net
Search
Search
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Autoinstall.sh
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
'''General''' As explained on the previous page, a file called autoinstall.sh is used to instruct Sync 3 which commands need to be executed. The language used in this file is bash/shell. You can find a lot about in on the internet but below are some useful subjects: * The first line of the autoinstall.sh of a Mod or App always starts with a so called "she-bang": #!/bin/sh It is used to tell the interpreter which scripting language is offered. In this case it is bash/shell. Useful sources for bash/shell online are: https://linuxconfig.org/bash-scripting-tutorial and https://www.freecodecamp.org/news/shell-scripting-crash-course-how-to-write-bash-scripts-in-linux/ * As you can see the first character is a #. That character can be used to add information to a script without being executed (but it can be interpreted, like offering the she-bang script language). * For most Mods an Apps a section is used at the top of the script that is commented out (starting with #) to show some nice fmods information. * After that it is common to declare some general Mod information and environment variables that are used in the script. * Example Mod Information'':'' ''<code># Mod Name : QuickDial Top-10 Contacts Mod ( QUICKDIAL_CONTACTS ).</code>'' ''<code># Author : Pascal Kolkman.</code><code># Creation date : 2024-07-14.</code><code># Version : 1.0.</code><code># Update date : 2024-07-14.</code><code># Update notes : First version.</code>''Example * Example Environment variables: ''<code>########################################################################################################################</code><code># DO NOT EDIT THIS BLOCK. #</code> <code># Environment variables. MODNAME. #</code> <code>########################################################################################################################</code>'' <code># Feel free to delete unnecessary Env. vars</code> <code>FILES_DIR="/fs/usb0/SyncMyMod/files"</code> <code># BIN_DIR="${FILES_DIR}/bin"</code> <code>PATCH_DIR="${FILES_DIR}/patch"</code> <code>SHELL_DIR="${FILES_DIR}/shell"</code> <code>OTHER_DIR="${FILES_DIR}/other"</code> <code>BACKUP_DIR="${OTHER_DIR}/backup"</code> <code>NEW_DIR="${OTHER_DIR}/new"</code> * The MODNAME variable is used to add information about the Mod to Sync3. * After the environment section, there is a section with functions that are called. They are used to display stuff, like text and images * Below that a section is offered in whcih is checked if FMOdsTools is insatlled (or before: Modstools). It should containg code like: <br /><code>if ! grep -q "${MODTOOLS}" /fs/rwdata/dev/mods_tools.txt; then</code> <code> displayMessage "FMods Tools not found. Installation aborted."</code> <code> else</code> <code> </code> <code> LINE=$(grep "$MODTOOLS" /fs/rwdata/dev/mods_tools.txt)</code> <code> MODS_TOOLS_VERSION=$(echo "$LINE" | awk -F'_' '{print $NF}')</code> <code> </code> <code> if ! awk 'BEGIN {exit !('"$MODS_TOOLS_VERSION"' >= '"$MIN_MODTOOLS_VERSION"') }'; then</code> <code> displayMessage "FMods Tools ${MIN_MODTOOLS_VERSION} or higher not found. Installation aborted."</code> <code> fi</code> <code>fi</code> * <br />
Summary:
Please note that all contributions to FMods.net may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
FMods.net:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width