Skip to content

Commit

Permalink
Tools: fix package_is_installed(), use for loop for ccache
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaaaky committed Feb 16, 2024
1 parent 7b9e651 commit d8221a7
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Tools/environment_install/install-prereqs-openSUSE-Tumbleweed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if $QUIET; then
fi

function package_is_installed() {
rpm -q ModemManager &>/dev/null
rpm -q $1 &>/dev/null
}

function heading() {
Expand Down Expand Up @@ -111,18 +111,11 @@ $PIP3 install -U $PYTHON_PKGS

(
cd /usr/lib64/ccache
if [ ! -f arm-none-eabi-g++ ]; then
sudo ln -s ../../bin/ccache arm-none-eabi-g++
fi
if [ ! -f arm-none-eabi-gcc ]; then
sudo ln -s ../../bin/ccache arm-none-eabi-gcc
fi
if [ ! -f arm-linux-gnueabihf-g++ ]; then
sudo ln -s ../../bin/ccache arm-linux-gnueabihf-g++
fi
if [ ! -f arm-linux-gnueabihf-gcc ]; then
sudo ln -s ../../bin/ccache arm-linux-gnueabihf-gcc
fi
for C in arm-none-eabi-g++ arm-none-eabi-gcc arm-linux-gnueabihf-g++ arm-linux-gnueabihf-gcc; do
if [ ! -f "$C" ]; then
sudo ln -s ../../bin/ccache "$C"
fi
done
)

ccache --set-config sloppiness=file_macro,locale,time_macros
Expand Down

0 comments on commit d8221a7

Please sign in to comment.