Browse Source

x230: x230_heads: bash syntax fixes

pull/35/head
Martin Kepplinger 6 years ago
parent
commit
0d19d3dba8
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      x230/x230_heads.sh

+ 4
- 4
x230/x230_heads.sh View File

@ -81,7 +81,7 @@ fi
OUTPUT_PATH=output OUTPUT_PATH=output
INPUT_IMAGE_NAME=$(basename ${INPUT_IMAGE_PATH})
INPUT_IMAGE_NAME=$(basename "${INPUT_IMAGE_PATH}")
OUTPUT_IMAGE_NAME=${INPUT_IMAGE_NAME%%.*}_prepared.rom OUTPUT_IMAGE_NAME=${INPUT_IMAGE_NAME%%.*}_prepared.rom
OUTPUT_IMAGE_PATH=${OUTPUT_PATH}/${OUTPUT_IMAGE_NAME} OUTPUT_IMAGE_PATH=${OUTPUT_PATH}/${OUTPUT_IMAGE_NAME}
@ -98,7 +98,7 @@ fi
rm -rf ${OUTPUT_PATH} rm -rf ${OUTPUT_PATH}
mkdir ${OUTPUT_PATH} mkdir ${OUTPUT_PATH}
cp ${INPUT_IMAGE_PATH} ${OUTPUT_IMAGE_PATH}
cp "${INPUT_IMAGE_PATH}" "${OUTPUT_IMAGE_PATH}"
LAYOUT_FILENAME="x230-layout-heads.txt" LAYOUT_FILENAME="x230-layout-heads.txt"
echo "0x00000000:0x00000fff ifd" > ${OUTPUT_PATH}/${LAYOUT_FILENAME} echo "0x00000000:0x00000fff ifd" > ${OUTPUT_PATH}/${LAYOUT_FILENAME}
@ -113,9 +113,9 @@ echo "prepared files in output directory. To flash them:"
echo -e "${GREEN}cd output${NC}" echo -e "${GREEN}cd output${NC}"
echo -e "${GREEN}flashrom -p internal --layout ${LAYOUT_FILENAME} --image bios -w ${OUTPUT_IMAGE_NAME}${NC}" echo -e "${GREEN}flashrom -p internal --layout ${LAYOUT_FILENAME} --image bios -w ${OUTPUT_IMAGE_NAME}${NC}"
while true; do while true; do
read -p "Do you wish to run this now? y/N: " yn
read -r -p "Do you wish to run this now? y/N: " yn
case $yn in case $yn in
[Yy]* ) cd output && flashrom -p internal --layout ${LAYOUT_FILENAME} --image bios -w ${OUTPUT_IMAGE_NAME}; break;;
[Yy]* ) cd output && flashrom -p internal --layout ${LAYOUT_FILENAME} --image bios -w "${OUTPUT_IMAGE_NAME}"; break;;
[Nn]* ) exit;; [Nn]* ) exit;;
* ) exit;; * ) exit;;
esac esac


Loading…
Cancel
Save