Browse Source

x230: scripts: improve checking for installed programs

pull/35/head
Martin Kepplinger 6 years ago
parent
commit
d92b4d5729
3 changed files with 6 additions and 7 deletions
  1. +3
    -4
      x230/external_install_bottom.sh
  2. +2
    -2
      x230/external_install_top.sh
  3. +1
    -1
      x230/x230_before_first_install.sh

+ 3
- 4
x230/external_install_bottom.sh View File

@ -81,6 +81,9 @@ do
shift
done
command -v flashrom >/dev/null 2>&1 || { echo -e >&2 "${RED}Please install flashrom and run as root${NC}."; exit 1; }
command -v make >/dev/null 2>&1 || { echo -e >&2 "${RED}Please install make and a C compiler${NC}."; exit 1; }
if [ ! "$have_flasher" -gt 0 ] ; then
echo "Skulls for the X230"
echo ""
@ -119,8 +122,6 @@ else
exit 1
fi
hash flashrom || echo -e "${RED}Please install flashrom and run as root${NC}"
TEMP_DIR=`mktemp -d`
if [ ! "$have_chipname" -gt 0 ] ; then
echo "trying to detect the chip..."
@ -156,8 +157,6 @@ if [ ! "$have_chipname" -gt 0 ] ; then
fi
fi
hash make || echo -e "${RED}Please install make and a C compiler${NC}"
make -C util/ifdtool
if [ ! -e ${IFDTOOL_PATH} ] ; then
echo "ifdtool not found at ${IFDTOOL_PATH}"


+ 2
- 2
x230/external_install_top.sh View File

@ -75,6 +75,8 @@ do
shift
done
command -v flashrom >/dev/null 2>&1 || { echo -e >&2 "${RED}Please install flashrom and run as root${NC}."; exit 1; }
if [ ! "$have_input_image" -gt 0 ] ; then
image_available=$(ls -1 | grep x230_coreboot_seabios | grep rom)
if [ -z "${image_available}" ] ; then
@ -138,8 +140,6 @@ else
exit 1
fi
hash flashrom || echo -e "${RED}Please install flashrom and run as root${NC}"
TEMP_DIR=`mktemp -d`
if [ ! "$have_chipname" -gt 0 ] ; then
echo "trying to detect the chip..."


+ 1
- 1
x230/x230_before_first_install.sh View File

@ -44,7 +44,7 @@ do
shift
done
hash dmidecode || echo -e "Please install dmidecode and run as root"
command -v dmidecode >/dev/null 2>&1 || { echo -e >&2 "${RED}Please install dmidecode and run as root.${NC}"; exit 1; }
LAPTOP=$(dmidecode | grep -i x230 | sort -u)
if [ -z "$LAPTOP" ] ; then


Loading…
Cancel
Save