mirror of
https://github.com/Egor00f/kolibrios-gcc-toolchain.git
synced 2024-11-21 17:03:48 +01:00
Update install.sh
+ Use tabs instad spaces + Updating all libraries
This commit is contained in:
parent
7e88c422d4
commit
0374af72f6
52
install.sh
52
install.sh
@ -2,30 +2,31 @@
|
|||||||
|
|
||||||
# Written by turbocat2001 (Maxim Logaev)
|
# Written by turbocat2001 (Maxim Logaev)
|
||||||
# Installation steps described by maxcodehack (Maxim Kuzmitsky)
|
# Installation steps described by maxcodehack (Maxim Kuzmitsky)
|
||||||
|
# modified by Egor00f (Egor)
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
print_msg(){
|
print_msg(){
|
||||||
echo -e "\e[34m$1\e[0m"
|
echo -e "\e[34m$1\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_ok(){
|
print_ok(){
|
||||||
echo -e "\e[32m$1\e[0m"
|
echo -e "\e[32m$1\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_err(){
|
print_err(){
|
||||||
echo -e "\e[31m$1\e[0m"
|
echo -e "\e[31m$1\e[0m"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
check_utils(){
|
check_utils(){
|
||||||
printf "%s: " $1
|
printf "%s: " $1
|
||||||
if command -v $1 &> /dev/null
|
if command -v $1 &> /dev/null
|
||||||
then
|
then
|
||||||
print_ok "ok\r"
|
print_ok "ok\r"
|
||||||
else
|
else
|
||||||
print_err "no\r"
|
print_err "no\r"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pwd
|
pwd
|
||||||
@ -40,7 +41,7 @@ echo -n $MESSAGE
|
|||||||
read INPUT
|
read INPUT
|
||||||
|
|
||||||
if [[ ! -z "$INPUT" ]]; then
|
if [[ ! -z "$INPUT" ]]; then
|
||||||
TOOLCHAIN_DIR=$INPUT
|
TOOLCHAIN_DIR=$INPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing toolchain to $TOOLCHAIN_DIR"
|
echo "Installing toolchain to $TOOLCHAIN_DIR"
|
||||||
@ -96,15 +97,7 @@ print_ok "Successfully!"
|
|||||||
print_msg "Updating libraries"
|
print_msg "Updating libraries"
|
||||||
|
|
||||||
cd lib
|
cd lib
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libdll.a -q -O libdll.a
|
sudo wget -r --no-parent -q http://builds.kolibrios.org/en_US/data/contrib/sdk/lib
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libfreetype.a -q -O libfreetype.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libc.dll.a -q -O libc.dll.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libSDLn.a -q -O libSDLn.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libcurses.a -q -O libcurses.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libz.dll.a -q -O libz.dll.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libogg.a -q -O libogg.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libvorbis.a -q -O libvorbis.a
|
|
||||||
sudo wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libopenjpeg.a -q -O libopenjpeg.a
|
|
||||||
|
|
||||||
print_ok "Successfully!"
|
print_ok "Successfully!"
|
||||||
|
|
||||||
@ -117,7 +110,7 @@ sudo wget http://board.kolibrios.org/download/file.php?id=8301libisl.so.10.2.2.7
|
|||||||
sudo 7z x -y libisl.so.10.2.2.7z
|
sudo 7z x -y libisl.so.10.2.2.7z
|
||||||
|
|
||||||
if ! [ -d /usr/lib/x86_64-linux-gnu/ ]; then
|
if ! [ -d /usr/lib/x86_64-linux-gnu/ ]; then
|
||||||
sudo mkdir -p /usr/lib/x86_64-linux-gnu/
|
sudo mkdir -p /usr/lib/x86_64-linux-gnu/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo mv /tmp/libisl.so.10.2.2 /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2
|
sudo mv /tmp/libisl.so.10.2.2 /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2
|
||||||
@ -138,7 +131,7 @@ print_ok "Successfully!"
|
|||||||
|
|
||||||
|
|
||||||
if [ "$TOOLCHAIN_DIR" != "$DEFAULT_TOOLCHAIN_DIR" ]; then
|
if [ "$TOOLCHAIN_DIR" != "$DEFAULT_TOOLCHAIN_DIR" ]; then
|
||||||
sudo ln -sf $TOOLCHAIN_DIR/win32 $DEFAULT_TOOLCHAIN_DIR
|
sudo ln -sf $TOOLCHAIN_DIR/win32 $DEFAULT_TOOLCHAIN_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -150,19 +143,20 @@ if [ ! "$(id -u)" -ne 0 ]
|
|||||||
then
|
then
|
||||||
echo $MESSAGE >> /etc/profile
|
echo $MESSAGE >> /etc/profile
|
||||||
|
|
||||||
sudo mkdir -p /etc/kos32-gcc
|
sudo mkdir -p /etc/kos32-gcc
|
||||||
echo $TOOLCHAIN_DIR > /etc/kos32-gcc/install-path
|
echo $TOOLCHAIN_DIR > /etc/kos32-gcc/install-path
|
||||||
else
|
else
|
||||||
if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then
|
if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then
|
||||||
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
|
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
|
||||||
echo '$EXPORT_MESSSAGE' >> ~/.bashrc
|
echo '$EXPORT_MESSSAGE' >> ~/.bashrc
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo chmod 775 $TOOLCHAIN_DIR/win32/bin/*
|
sudo chmod 775 $TOOLCHAIN_DIR/win32/bin/*
|
||||||
sudo chmod 775 $TOOLCHAIN_DIR/win32/include/*
|
sudo chmod 775 $TOOLCHAIN_DIR/win32/include/*
|
||||||
sudo chmod -R 775 $TOOLCHAIN_DIR/win32/lib/gcc/mingw32/5.4.0/include
|
sudo chmod -R 775 $TOOLCHAIN_DIR/win32/lib/gcc/mingw32/5.4.0/include
|
||||||
|
|
||||||
|
|
||||||
cd "$OLDPWD"
|
cd "$OLDPWD"
|
||||||
|
|
||||||
export PATH=$PATH:$TOOLCHAIN_DIR/win32/bin
|
export PATH=$PATH:$TOOLCHAIN_DIR/win32/bin
|
||||||
|
Loading…
Reference in New Issue
Block a user