diff --git a/README.md b/README.md index 53f614e..095efd6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # chromium-latest-linux Scripts to download and run the latest Linux build of Chromium. + +## Instructions + +### Running the scripts + +To run the scripts, use the following commands: + +```bash +./run.sh +``` + +### Updating and running the scripts + +To update and run the scripts, use the following commands: + +```bash +./update-and-run.sh +``` diff --git a/run.sh b/run.sh old mode 100755 new mode 100644 index 2d5f026..73fd843 --- a/run.sh +++ b/run.sh @@ -2,4 +2,9 @@ BASEDIR=$(dirname $0) +if [ ! -d "$BASEDIR/latest" ]; then + echo "The 'latest' directory does not exist. Please run update.sh first." + exit 1 +fi + $BASEDIR/latest/chrome --user-data-dir="$BASEDIR/user-data-dir" $* &> /dev/null & diff --git a/update.sh b/update.sh old mode 100755 new mode 100644 index 6730185..779f458 --- a/update.sh +++ b/update.sh @@ -24,8 +24,14 @@ mkdir $REVISION pushd $REVISION curl -# $ZIP_URL > $ZIP_FILE echo "unzipping.." + +if ! command -v unzip &> /dev/null +then + echo "unzip command could not be found. Please install unzip and try again." + exit +fi + unzip $ZIP_FILE popd rm -f ./latest ln -s $REVISION/chrome-linux/ ./latest -