mrchromebox script(curl)

Posted ynov

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mrchromebox script(curl)相关的知识,希望对你有一定的参考价值。

 1 #!/bin/bash
 2 #
 3 # This script offers provides the ability to update the 
 4 # Legacy Boot payload, set boot options, and install
 5 # a custom coreboot firmware for supported
 6 # ChromeOS devices 
 7 #
 8 # Created by Mr.Chromebox <mrchromebox@gmail.com>
 9 #
10 # May be freely distributed and modified as needed, 
11 # as long as proper attribution is given.
12 #
13 
14 #where the stuff is
15 script_url="https://raw.githubusercontent.com/MattDevo/scripts/master/"
16 
17 #set working dir
18 cd /tmp
19 
20 #get support scripts
21 rm -rf firmware.sh >/dev/null &2>1
22 rm -rf functions.sh >/dev/null &2>1
23 rm -rf sources.sh >/dev/null &2>1
24 curl -s -L -O ${script_url}firmware.sh
25 rc0=$?
26 curl -s -L -O ${script_url}functions.sh
27 rc1=$?
28 curl -s -L -O ${script_url}sources.sh
29 rc2=$?
30 if [[ $rc0 -ne 0 || $rc1 -ne 0 || $rc2 -ne 0 ]]; then
31     echo -e "Error downloading one or more required files; cannot continue"
32     exit 1
33 fi
34 
35 source ./sources.sh
36 source ./firmware.sh
37 source ./functions.sh
38 
39 #do setup stuff
40 prelim_setup
41 [[ $? -ne 0 ]] &&     exit 1
42 
43 #show menu
44 menu_fwupdate
firmware-util.sh

 

以上是关于mrchromebox script(curl)的主要内容,如果未能解决你的问题,请参考以下文章

curl方式执行脚本时传参问题

将cURL与PHP文件中的Google Apps Script Web App一起使用时遇到问题

Linux curl命令简介

ABAP的HTTP_GET和Linux的curl

CentOS 初体验九:curl 的使用

执行 curl 获取的脚本时将参数传递给 bash