1 Star 1 Fork 7

FydeOS/MrChromebox-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
firmware-util.sh 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
#
# This script offers provides the ability to update the
# Legacy Boot payload, set boot options, and install
# a custom coreboot firmware for supported
# ChromeOS devices
#
# Created by Mr.Chromebox <mrchromebox@gmail.com>
#
# May be freely distributed and modified as needed,
# as long as proper attribution is given.
#
#where the stuff is
script_url="https://gitee.com/fydeos_fyde/mr-chromebox-scripts/raw/master/"
#ensure output of system tools in en-us for parsing
export LC_ALL=C
#set working dir
if cat /etc/lsb-release | grep "Chrom" > /dev/null 2>&1; then
# needed for ChromeOS/ChromiumOS v82+
mkdir -p /usr/local/bin
cd /usr/local/bin
else
cd /tmp
fi
#get support scripts
echo -e "\nCurrent working directory is:\n\n"
pwd
echo -e "\nDownloading supporting files from mirror site..."
rm -rf firmware.sh >/dev/null 2>&1
rm -rf functions.sh >/dev/null 2>&1
rm -rf sources.sh >/dev/null 2>&1
curl -sLO ${script_url}firmware.sh
rc0=$?
echo -e "\nDownloading firmware.sh from mirror site..."
curl -sLO ${script_url}functions.sh
rc1=$?
echo -e "\nDownloading functions.sh from mirror site..."
curl -sLO ${script_url}sources.sh
rc2=$?
echo -e "\nDownloading sources.sh from mirror site..."
if [[ $rc0 -ne 0 || $rc1 -ne 0 || $rc2 -ne 0 ]]; then
echo -e "Error downloading one or more required files; cannot continue"
exit 1
fi
source ./sources.sh
source ./firmware.sh
source ./functions.sh
#set working dir
cd /tmp
#do setup stuff
prelim_setup
[[ $? -ne 0 ]] && exit 1
#show menu
menu_fwupdate
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fydeos_fyde/mr-chromebox-scripts.git
git@gitee.com:fydeos_fyde/mr-chromebox-scripts.git
fydeos_fyde
mr-chromebox-scripts
MrChromebox-scripts
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385