Commit 12ba02e3 authored by Konrad Grochowski's avatar Konrad Grochowski

add-ons: shellcheck applied

parent c86be6ec
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=../install/common.sh
. "${DIR}/../install/common.sh"
function CheckTargetFolder() {
......@@ -38,10 +40,9 @@ function DownloadAndExtract() {
echo "[-] Downloading and uncompressing ${DESCRIPTION}..."
echo "[-]"
wget -q --show-progress -O - "${URL}" | \
( cd "${PREFIX}" || exit 1 ; sudo tar xv${COMPRESSION}f - )
if [ $? -ne 0 ] ; then
if ! wget -q --show-progress -O - "${URL}" | \
( cd "${PREFIX}" || exit 1 ; sudo tar "xv${COMPRESSION}f" - )
then
echo "Downloading ${DESCRIPTION} has failed."
echo Aborting...
exit 1
......@@ -69,9 +70,8 @@ function DownloadToTemp() {
echo "[-] Downloading ${DESCRIPTION}..."
echo "[-]"
wget -q --show-progress -O "${DOWNLOADED_FILE}" "${URL}"
if [ $? -ne 0 ] ; then
if ! wget -q --show-progress -O "${DOWNLOADED_FILE}" "${URL}"
then
echo "Downloading ${DESCRIPTION} has failed."
echo "Aborting..."
exit 1
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
DESCRIPTION="FreeRTOS"
......@@ -20,6 +22,5 @@ sudo unzip "$DOWNLOADED_FILE" -d "$PREFIX"
rm "$DOWNLOADED_FILE"
echo "[-] Creating FREERTOS_PATH enviroment variable"
PATH_CMD="export FREERTOS_PATH=\"$INSTALL_PATH\""
UpdatePATH
UpdatePROFILE "export FREERTOS_PATH=\"$INSTALL_PATH\""
echo "[-] Reload terminal (or source ~/.bashrc.taste) to apply change"
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
DESCRIPTION="Gaisler's RTEMS 4.10"
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
DESCRIPTION="Gaisler's RCC1.3-rc5"
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
DESCRIPTION="Gaisler's RCC1.3-rc6"
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
# shellcheck source=common.sh
. "${DIR}/common.sh"
# Fetch and install latest AdaCore ARM release
SIG=$(/usr/gnat/bin/arm-eabi-gcc -v 2>&1 | tail -1)
......@@ -24,5 +26,4 @@ if [ "${SIG}" != "gcc version 6.3.1 20170510 (for GNAT GPL 2017 20170515) (GCC)
fi
# Add to PATH
PATH_CMD='export PATH=$PATH:'"/usr/gnat/bin"
UpdatePATH
UpdatePROFILE "export PATH=\$PATH:/usr/gnat/bin"
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
InstallBSP \
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
InstallBSP \
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=common.sh
. "${DIR}/common.sh"
DESCRIPTION="MSP430 GCC Toolchain"
......@@ -7,8 +9,8 @@ INSTALL_PATH="/opt/msp430-gcc"
CheckTargetFolder "${DESCRIPTION}" "${INSTALL_PATH}"
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
MACHINE_TYPE=$(uname -m)
if [ "${MACHINE_TYPE}" == 'x86_64' ]; then
ARCH_INFIX="-x64"
echo "[-] Selected 64bit version."
else
......@@ -22,15 +24,14 @@ echo "[-]"
echo "[-] Installing MSP430-GCC..."
echo "[-]"
chmod +x ${DOWNLOADED_FILE}
sudo ${DOWNLOADED_FILE} \
chmod +x "${DOWNLOADED_FILE}"
sudo "${DOWNLOADED_FILE}" \
--mode unattended \
--unattendedmodeui minimal \
--prefix /opt/msp430-gcc
rm ${DOWNLOADED_FILE}
rm "${DOWNLOADED_FILE}"
echo "[-] Appending ${INSTALL_PATH}/bin to PATH"
PATH_CMD="export PATH=\$PATH:${INSTALL_PATH}/bin"
UpdatePATH
UpdatePROFILE "export PATH=\$PATH:${INSTALL_PATH}/bin"
echo "[-] Reload terminal (or source ~/.bashrc.taste) to apply change"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment