Small env fixes: git submodules & python3 (#127)

* Small env fixes: for git submodules & python3

Using `/usr/bin/env python3` is preferred over `/usr/bin/python3`
because it is compatible with virtualenvs, etc. It picks the version of
`python3` currently on the `PATH`, rather than the system-wide default.

For the git submodules, I had two issues:

The ZAPD repo is currently pointing at a commit not on the master
branch, which has to be specifically fetched. Adding `--remote` to the
update command fixes this.

The decomp-permuter has primary branch `main` not `master` like this
repo, so this has to be specified in `.gitmodules` when using `--remote`.

* Rework `git submodule update...` part of Makefile
This commit is contained in:
Zach Banks 2021-05-18 19:53:11 -04:00 committed by GitHub
parent 0e3e008da4
commit 091219d742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 4 deletions

1
.gitmodules vendored
View File

@ -7,6 +7,7 @@
[submodule "tools/decomp-permuter"]
path = tools/decomp-permuter
url = https://github.com/simonlindholm/decomp-permuter
branch = main
[submodule "ZAPD"]
path = tools/ZAPD
url = https://github.com/zeldaret/ZAPD.git

View File

@ -212,7 +212,10 @@ distclean: assetclean clean
## Extraction step
setup:
git submodule update --init --recursive
# Initialize submodules, fetching commit in case it is not on the default branch
-git submodule update --init --recursive
git submodule foreach --recursive 'git fetch origin $$sha1'
git submodule update --recursive
python3 -m pip install -r requirements.txt
$(MAKE) -C tools
./tools/extract_rom.py $(MM_BASEROM)

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
import os
import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
import os
import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
import os
import sys