Merge branch 'romhack' into lighting
This commit is contained in:
commit
513d1b1d30
1 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Git REmote Make
|
||||||
# Push to SSH machine; build and scp build products back
|
# Push to SSH machine; build and scp build products back
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
@ -7,9 +8,10 @@ git_branch=$(git branch --show-current)
|
||||||
# See https://unix.stackexchange.com/a/13472
|
# See https://unix.stackexchange.com/a/13472
|
||||||
remote_host=$(git remote get-url build | sed -nr -e "s/ssh:\/\/(\w+@?\w*):.*/\1/p") # Extract remote host
|
remote_host=$(git remote get-url build | sed -nr -e "s/ssh:\/\/(\w+@?\w*):.*/\1/p") # Extract remote host
|
||||||
remote_path=$(git remote get-url build | sed -nr -e "s/ssh:\/\/\w+@?\w*://p") # Extract remote path
|
remote_path=$(git remote get-url build | sed -nr -e "s/ssh:\/\/\w+@?\w*://p") # Extract remote path
|
||||||
|
make_cmd=$(git config --local remake.make)
|
||||||
|
make_product=$(git config --local remake.src)
|
||||||
|
make_dest=$(git config --local remake.dest)
|
||||||
set -x
|
set -x
|
||||||
git push build --force
|
git push build --force
|
||||||
# `nproc` must be escaped so that it executes on the remote machine
|
ssh $remote_host "cd $remote_path && git reset --hard && git checkout $git_branch && $make_cmd"
|
||||||
ssh $remote_host "cd $remote_path && git reset --hard && git checkout $git_branch && \
|
scp "$remote_host:$remote_path/$make_product" $make_dest
|
||||||
echo \"Using \`nproc\` job(s)\" && make DDEBUG=1 -j\`nproc\`"
|
|
||||||
scp "$remote_host:$remote_path/pokeemerald.gba" romhack.gba
|
|
||||||
|
|
Loading…
Reference in a new issue