mirror of
https://github.com/pret/agbcc.git
synced 2026-04-25 15:35:13 -05:00
Add helpful error checks for common user errors.
This commit is contained in:
parent
5297ebf508
commit
de7ccf2a43
6
build.sh
6
build.sh
|
|
@ -3,6 +3,12 @@ set -e
|
|||
CCOPT=
|
||||
CXXOPT=
|
||||
|
||||
# error if devkitarm is not installed and binutils-arm-none-eabi is not installed
|
||||
if ! ([ -v DEVKITARM ] && [ -d "$DEVKITARM/bin" ]) && ! (command -v arm-none-eabi-as &> /dev/null && command -v arm-none-eabi-ar &> /dev/null) ; then
|
||||
echo "Could not find a binutils installation! Re-read the instructions and make sure you've installed either devkitARM or binutils-arm-none-eabi, depending on your system."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -z "$CC" ]; then CCOPT=CC=$CC; fi
|
||||
if [ ! -z "$CXX" ]; then CXXOPT=CXX=$CXX; fi
|
||||
make -C gcc clean
|
||||
|
|
|
|||
26
install.sh
26
install.sh
|
|
@ -1,17 +1,21 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
if [ "$1" != "" ]; then
|
||||
mkdir -p $1/tools/agbcc
|
||||
mkdir -p $1/tools/agbcc/bin
|
||||
mkdir -p $1/tools/agbcc/include
|
||||
mkdir -p $1/tools/agbcc/lib
|
||||
cp agbcc $1/tools/agbcc/bin/
|
||||
cp old_agbcc $1/tools/agbcc/bin/
|
||||
cp agbcc_arm $1/tools/agbcc/bin/
|
||||
cp -R libc/include $1/tools/agbcc/ #drop include, because we don't want include/include
|
||||
cp ginclude/* $1/tools/agbcc/include/
|
||||
cp libgcc.a $1/tools/agbcc/lib/
|
||||
cp libc.a $1/tools/agbcc/lib/
|
||||
if [ -d "$1" ]; then
|
||||
mkdir -p $1/tools/agbcc
|
||||
mkdir -p $1/tools/agbcc/bin
|
||||
mkdir -p $1/tools/agbcc/include
|
||||
mkdir -p $1/tools/agbcc/lib
|
||||
cp agbcc $1/tools/agbcc/bin/
|
||||
cp old_agbcc $1/tools/agbcc/bin/
|
||||
cp agbcc_arm $1/tools/agbcc/bin/
|
||||
cp -R libc/include $1/tools/agbcc/ #drop include, because we don't want include/include
|
||||
cp ginclude/* $1/tools/agbcc/include/
|
||||
cp libgcc.a $1/tools/agbcc/lib/
|
||||
cp libc.a $1/tools/agbcc/lib/
|
||||
else
|
||||
echo "Target directory does not exist. Did you mean to do \"./install.sh ../$1\"?"
|
||||
fi
|
||||
else
|
||||
echo "Usage: install.sh PATH"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user