mirror of
https://github.com/pmret/papermario.git
synced 2024-09-19 16:01:48 +02:00
Add Fedora to install.sh
(#1049)
* Update install.sh * Update install.sh I'll work on this when I don't feel like I'm losing braincells * Update install.sh Get `--extra` up for Fedora * Update install.sh * Update install.sh Imagine typos * Update install.sh Finished!
This commit is contained in:
parent
ec6f2ef428
commit
7b37ff9230
51
install.sh
51
install.sh
@ -59,6 +59,56 @@ if cat /etc/os-release | grep -E 'ID=debian|ID_LIKE=(.*)debian' &> /dev/null; th
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fedora (dnf)
|
||||||
|
if cat /etc/os-release | grep -E ID=fedora &> /dev/null; then
|
||||||
|
supported=true
|
||||||
|
|
||||||
|
echo "Installing packages for Fedora (dnf)"
|
||||||
|
|
||||||
|
${SUDO} dnf install -y curl git python3 python3-pip python3-setuptools ninja-build gcc-mips64-linux-gnu libyaml-devel zlib-devel || exit 1
|
||||||
|
${SUDO} dnf group info "C Development Tools and Libraries" "Development Tools" || exit 1
|
||||||
|
# Install binutils if required
|
||||||
|
if ! command -v mips-linux-gnu-ar &> /dev/null; then
|
||||||
|
PKG="mips-linux-gnu-binutils"
|
||||||
|
|
||||||
|
RETURNDIR="$(pwd)"
|
||||||
|
cd "$(mktemp -d)"
|
||||||
|
|
||||||
|
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
|
||||||
|
tar -xf binutils-2.35.tar.bz2
|
||||||
|
|
||||||
|
cd binutils-2.35
|
||||||
|
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
|
||||||
|
./configure --target=mips-linux-gnu \
|
||||||
|
--with-sysroot=/usr/mips-linux-gnu \
|
||||||
|
--prefix=/usr \
|
||||||
|
--disable-multilib \
|
||||||
|
--with-gnu-as \
|
||||||
|
--with-gnu-ld \
|
||||||
|
--disable-nls \
|
||||||
|
--enable-ld=default \
|
||||||
|
--enable-plugins \
|
||||||
|
--enable-deterministic-archives \
|
||||||
|
--disable-werror
|
||||||
|
${SUDO} make
|
||||||
|
${SUDO} make install
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
# delete temp directory we made
|
||||||
|
rm -rf "$(pwd)"
|
||||||
|
# go back to old dir
|
||||||
|
cd "${RETURNDIR}"
|
||||||
|
fi
|
||||||
|
python3 -m pip install -U -r requirements.txt
|
||||||
|
cp tools/precommit_check_no_assets.sh "$(git rev-parse --git-path hooks)/pre-commit" || exit 1
|
||||||
|
|
||||||
|
if [[ $1 == "--extra" ]]; then
|
||||||
|
echo "Installing extra"
|
||||||
|
${SUDO} dnf install -y clang-tools-extra astyle doxygen || exit 1
|
||||||
|
python3 -m pip install -U -r requirements_extra.txt || exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Arch Linux and derivatives (pacman)
|
# Arch Linux and derivatives (pacman)
|
||||||
if cat /etc/os-release | grep -E 'ID=arch|ID_LIKE=arch' &> /dev/null; then
|
if cat /etc/os-release | grep -E 'ID=arch|ID_LIKE=arch' &> /dev/null; then
|
||||||
supported=true
|
supported=true
|
||||||
@ -198,6 +248,7 @@ if [ "$supported" != true ]; then
|
|||||||
echo "- Arch Linux (pacman)"
|
echo "- Arch Linux (pacman)"
|
||||||
echo "- openSUSE (zypper)"
|
echo "- openSUSE (zypper)"
|
||||||
echo "- Alpine Linux (apk)"
|
echo "- Alpine Linux (apk)"
|
||||||
|
echo "- Fedora (dnf)"
|
||||||
echo "Please consider contributing and adding an installation script for your distro."
|
echo "Please consider contributing and adding an installation script for your distro."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user