sh 需要Web Btowser软件的最前沿?获取Chromium的最新版本。更新了2018.他们最近更改了文件夹结构

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 需要Web Btowser软件的最前沿?获取Chromium的最新版本。更新了2018.他们最近更改了文件夹结构相关的知识,希望对你有一定的参考价值。

#!/bin/sh
# Get current build for Chromium on Mac.
# 
# @version  2009-05-22
# @author   XXXX 
# @todo     Nothing yet
echo 
"                                      .·´`·. 
                                  .·´    .·´··. 
                              .·´    .·´    .·´`·. 
                          .·´    .·´    .·´       `·. 
                      .·´        `·..·´              `·. 
                  .·´    .·´`·.     `·.           .·´`·.`·. 
              .·´    .·´       `·.     `·.    .·´   .·´ .·´·.. 
          .·´·:· .·´              `·.     `·. `·.·´ .·´ .·´   `·. 
          `·..·´                     `·.     `·..·´ .·´       .·´ 
             `·.                        `·.     `·´       .·´ 
                `·.                        `·.        .·´ 
                   `·.                    .·´     .·´ 
                      `·.             .·´     .·´ 
                         `·.      .·´     .·´ 
                            `·.·´ ·:· .·´ 
                               `·..·´";
# setup ------------------------------------------------------------------------
tempDir="/tmp/`whoami`/chrome-nightly/";
baseURL="http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac";
baseName="chrome-mac";
baseExt="zip";
appName="Chromium.app";
appDir="/Applications";
version=~/.CURRENT_CHROME;
# ------------------------------------------------------------------------------


# ------------------------------------------------------------------------------
function checkForErrors {
    if [ "$?" != "0" ]; then
        echo "Unkown error (see above for help)!";
        exit 3;
    fi
}
# ------------------------------------------------------------------------------


# ------------------------------------------------------------------------------
echo "Setup...";
mkdir -p "$tempDir";
cd "$tempDir";
checkForErrors;
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
echo "Checking current version...";
touch $version
currentVersion=`cat $version`;
latestVersion=`curl -s $baseURL/LATEST_CHANGE`;
checkForErrors;
echo " * your/latest build: $currentVersion / $latestVersion";
if [ "$currentVersion" == "$latestVersion" ]; then
    echo " * build $currentVersion is the latest one.";
    exit 1;
fi
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
echo "Downloading and unpacking...";
chromePID=`ps wwaux|grep -v grep|grep "$appName"|awk '{print $2}'`;
if [ "$chromePID" != "" ];then
    echo " * chromium is running. Please stop it first.";
    exit 2;
fi
#curl -o $baseName.$baseExt "$baseURL/$latestVersion/$baseName.$baseExt";
curl -L "$baseURL/$latestVersion/$baseName.$baseExt" -o $baseName.$baseExt;
unzip -qo $baseName.$baseExt;
checkForErrors;
# ------------------------------------------------------------------------------


# ------------------------------------------------------------------------------
echo "Installing...";
cp -r $baseName/$appName $appDir
checkForErrors;
echo $latestVersion > $version;
# ------------------------------------------------------------------------------


# ------------------------------------------------------------------------------
echo "Done. You're now running build $latestVersion";
# ------------------------------------------------------------------------------

以上是关于sh 需要Web Btowser软件的最前沿?获取Chromium的最新版本。更新了2018.他们最近更改了文件夹结构的主要内容,如果未能解决你的问题,请参考以下文章

sh 运行此命令以获取只能读取安全监视软件的主机文件系统的容器

Web 前沿技术:展示一组极其绚丽的 CSS3 效果

linux快速部署Web,Ftp

前端前沿web 3d可视化技术 ThreeJS学习全记录

手机上写歌词的软件,原创歌词创作软件app下载,有吗?

百场前沿技术系列讲座直播性能测试诊断分析专题讲座