-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from uyjulian/buildsystem_improve
Buildsystem improvements
- Loading branch information
Showing
5 changed files
with
108 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
PS2TOOLCHAIN_DVP_REPO_URL="https://github.com/ps2dev/ps2toolchain-dvp.git" | ||
PS2TOOLCHAIN_DVP_DEFAULT_REPO_REF="main" | ||
PS2TOOLCHAIN_IOP_REPO_URL="https://github.com/ps2dev/ps2toolchain-iop.git" | ||
PS2TOOLCHAIN_IOP_DEFAULT_REPO_REF="main" | ||
PS2TOOLCHAIN_EE_REPO_URL="https://github.com/ps2dev/ps2toolchain-ee.git" | ||
PS2TOOLCHAIN_EE_DEFAULT_REPO_REF="main" | ||
|
||
if test -f "$PS2DEV_CONFIG_OVERRIDE"; then | ||
source "$PS2DEV_CONFIG_OVERRIDE" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
#!/bin/bash | ||
# 001-dvp.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 001-dvp.sh by ps2dev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/ps2toolchain-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/ps2dev/ps2toolchain-dvp" | ||
REPO_FOLDER="ps2toolchain-dvp" | ||
REPO_URL="$PS2TOOLCHAIN_DVP_REPO_URL" | ||
REPO_REF="$PS2TOOLCHAIN_DVP_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific TAG has been selected, it is passed using parameter $1 | ||
[ -z "$1" ] && REPO_REFERENCE="main" || REPO_REFERENCE=$1 | ||
echo "Using repo reference $REPO_REFERENCE" | ||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone $REPO_URL -b "${REPO_REFERENCE}" || exit 1 | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
cd "$REPO_FOLDER" && git fetch origin && git reset --hard "origin/${REPO_REFERENCE}" && git checkout "${REPO_REFERENCE}" || exit 1 | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
## Build and install. | ||
./toolchain.sh || { exit 1; } | ||
./toolchain.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
#!/bin/bash | ||
# 002-iop.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 002-iop.sh by ps2dev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/ps2toolchain-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/ps2dev/ps2toolchain-iop" | ||
REPO_FOLDER="ps2toolchain-iop" | ||
REPO_URL="$PS2TOOLCHAIN_IOP_REPO_URL" | ||
REPO_REF="$PS2TOOLCHAIN_IOP_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific TAG has been selected, it is passed using parameter $1 | ||
[ -z "$1" ] && REPO_REFERENCE="main" || REPO_REFERENCE=$1 | ||
echo "Using repo reference $REPO_REFERENCE" | ||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone $REPO_URL -b "${REPO_REFERENCE}" || exit 1 | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
cd "$REPO_FOLDER" && git fetch origin && git reset --hard "origin/${REPO_REFERENCE}" && git checkout "${REPO_REFERENCE}" || exit 1 | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
## Build and install. | ||
./toolchain.sh || { exit 1; } | ||
./toolchain.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
#!/bin/bash | ||
# 003-ee.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 003-ee.sh by ps2dev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/ps2toolchain-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/ps2dev/ps2toolchain-ee" | ||
REPO_FOLDER="ps2toolchain-ee" | ||
REPO_URL="$PS2TOOLCHAIN_EE_REPO_URL" | ||
REPO_REF="$PS2TOOLCHAIN_EE_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific TAG has been selected, it is passed using parameter $1 | ||
[ -z "$1" ] && REPO_REFERENCE="main" || REPO_REFERENCE=$1 | ||
echo "Using repo reference $REPO_REFERENCE" | ||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone $REPO_URL -b "${REPO_REFERENCE}" || exit 1 | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
cd "$REPO_FOLDER" && git fetch origin && git reset --hard "origin/${REPO_REFERENCE}" && git checkout "${REPO_REFERENCE}" || exit 1 | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
## Build and install. | ||
./toolchain.sh || { exit 1; } | ||
./toolchain.sh |