Closed johnodon closed 4 years ago
Well, the bootstrap pulls down the rest of the repo from GitHub, so it needs to know where to look for it. If you are forking, I would edit the bootstrap.sh in your fork directly in GitHub using its editor feature.
Alternatively, you can just download the bootstrap and edit it locally:
wget https://raw.githubusercontent.com/MizterB/RetroPie-Setup-Ubuntu/LTS-20.04/bootstrap.sh
chmod +x ./bootstrap.sh
nano ./bootstrap.sh
sudo ./bootstrap.sh
I don't believe I can change the logic for this use, but I could update the instructions.
On the other hand, if you have already downloaded the repo locally (not clear here), you don't need to run the bootstrap at all. All the bootstrap is doing is installing Git, cloning the repo, and activating the LTS-20.04 branch. If you've already done those steps yourself, you can go straight to the installer. I included the bootstrap mostly to simplify mini.iso installs, where Git is not already installed, but it can be used anywhere.
OK...I wasn't sure if there was a way to use a variable that looks at the current path where git clones from.
Not sure what you are describing - can you detail you use case some more? Maybe something is possible.
I forked your repo to my own.
On my repo, I edited the retropie_setup_ubuntu.sh script and commented out the functions for nvidia and vulkan drivers (since I have an Intel chip) and also the plymouth theme:
enable_logging
run_optional_scripts "$OPTIONAL_SCRIPT_DIR/pre_install"
#-- Basic RetroPie install
install_retropie_dependencies
install_retropie
install_retroarch_shaders
disable_sudo_password
#-- Common video drivers
install_latest_intel_drivers
**#install_latest_nvidia_drivers
#install_vulkan**
#-- Hide text and boot directly into EmulationStation
**#enable_plymouth_theme "retropie-pacman" # See https://github.com/HerbFargus/plymouth-themes.git for other theme names**
hide_boot_messages
enable_runlevel_multiuser
enable_autologin_tty
enable_autostart_xwindows
hide_openbox_windows
autostart_openbox_apps
#-- Additional customizations
install_extra_tools
fix_quirks
#-- OPTIONAL STEPS (comment/change as needed)
# These are helpful for improving 4k performance and user experience
set_resolution_xwindows "1920x1080" # Run 'xrandr --display :0' when a X Windows session is running to the supported resolutions
set_resolution_grub "1920x1080x32" # Run 'vbeinfo' (legacy, pre 18.04) or 'videoinfo' (UEFI) from the GRUB command line to see the supported modes
run_optional_scripts "$OPTIONAL_SCRIPT_DIR/post_install"
#-- Final cleanup
repair_permissions
remove_unneeded_packages
complete_install
When I follow the instructions and 'wget' the bootstrap.sh from my repo and run it (notice my repo name in the URL below):
wget -qO - https://raw.githubusercontent.com/johnodon/RetroPie-Setup-Ubuntu/LTS-20.04/bootstrap.sh | sudo bash
...the bootstrap.sh file that was forked is hardcoded with a link to the retropie_setup_ubuntu.sh on your repo (as shown by the REPO_URL variable):
SCRIPT_DIR="$(pwd)" REPO_NAME="RetroPie-Setup-Ubuntu" REPO_URL="https://github.com/MizterB/$REPO_NAME" REPO_BRANCH="LTS-20.04"
So, when this runs, it essentially git clones the retropie_setup_ubuntu.sh script from your repo instead of mine and the changes I made to the script are not there.
Does that make sense?
Got it - thank you. I have an idea of how to handle this, including an override of the repo and brach names. Will try it out.
Should be all set now. Bootstrap is independent of the repository. You can pass repository URL and branch options to the bootstrap script and pull from your own fork & branch if desired. An example is in the README.
Note that the 20.04 branch has now been merged into master as well.
Cool. Let me blow away my repo and re-fork. I'll report back on both cases (bootstrap and master merge).
Based on your other feedback (and PR), I'm assuming this works as requested?
Based on your other feedback (and PR), I'm assuming this works as requested?
Let me take a harder look. I seemed to be ending up with 2 copies of the retropie_setup_ubuntu.sh script...one in the root of the home folder and one in the ~\Retropie_Setup_Ubuntu folder. Then again, I was playing around from my own repo and may have caused that issue. I'll burn everything down and pull from yours.
Keep this open for now if you don't mind.
OK...this is working as expected and can be closed.
I may have found another issue...
I have a branch on my fork called 'xsession-errors'. The only thing that is different about this branch is that I created a new script and placed it in the library folder. When I run bootstrap.sh with the arguments shown below, the script is downloaded to /home/pi/optional_scripts/library rather than with the rest of the scripts in /home/pi/RetroPie-Setup-Ubuntu/optional_scripts/library. The folder also retains root as the owner.
sudo bash ./bootstrap.sh -r https://github.com/johnodon/RetroPie-Setup-Ubuntu -b xsession-errors
pi@ELITEDESK:~$ ls -la
total 48
drwxr-xr-x 6 pi pi 4096 Sep 25 14:36 .
drwxr-xr-x 3 root root 4096 Sep 24 10:00 ..
-rw------- 1 pi pi 12 Sep 24 10:01 .bash_history
-rw-r--r-- 1 pi pi 220 Sep 24 10:00 .bash_logout
-rw-r--r-- 1 pi pi 3771 Sep 24 10:00 .bashrc
-rw-rw-r-- 1 pi pi 2247 Sep 25 14:34 bootstrap.sh
drwx------ 2 pi pi 4096 Sep 24 10:01 .cache
drwxrwxr-x 3 pi pi 4096 Sep 25 14:34 .local
drwxr-xr-x 3 root root 4096 Sep 25 14:36 optional_scripts
-rw-r--r-- 1 pi pi 807 Sep 24 10:00 .profile
drwxr-xr-x 5 pi pi 4096 Sep 25 14:36 RetroPie-Setup-Ubuntu
-rw-r--r-- 1 pi pi 0 Sep 24 10:01 .sudo_as_admin_successful
-rw-rw-r-- 1 pi pi 180 Sep 25 14:34 .wget-hsts
Thanks. I tried to get cute with git and broke this. Fixed in b59233382379ed9363c3062d87faf22042453d53.
I forked your repo just for my own testing (i.e. wanted to comment out the plymouth theme). However, the bootstap.sh has the path to your main script hardcoded:
SCRIPT_DIR="$(pwd)" REPO_NAME="RetroPie-Setup-Ubuntu" REPO_URL="https://github.com/MizterB/$REPO_NAME" REPO_BRANCH="LTS-20.04"
I imagine that there is a way to change this to look at the local repo.
John