update files

This commit is contained in:
robocopAlpha 2020-08-04 00:49:07 +03:00
parent b9216cebbc
commit 7228492a12
3 changed files with 16 additions and 11 deletions

View file

@ -21,7 +21,7 @@ Now you'll be easily able to track the changes made by `brew upgrade`or `brew cl
### How to use ### How to use
```sh ```sh
curl -sSL 'install.sh' | bash curl -sSL 'https://raw.githubusercontent.com/robocopAlpha/brewlog/master/install.sh' | bash
# Show help # Show help
brewlog --help brewlog --help

View file

@ -22,11 +22,10 @@ Usage:
e.g. e.g.
brewlog install ffmpeg, invokes "brew install ffmpeg" and writes output to a log file. brewlog install ffmpeg, invokes "brew install ffmpeg" and writes output to a log file.
--help Show help
--brew-help show brew commands (alias to "brew help")
OPTIONS: OPTIONS:
version Show brewlog version --help Show help
--brew-help Show brew commands (alias to "brew help")
version Show brewlog version info
archive Archives the current log file as .xz archive Archives the current log file as .xz
tail [-n INT] Show the last "INT" lines from the log file. tail [-n INT] Show the last "INT" lines from the log file.
(default: last 15 lines) (default: last 15 lines)
@ -52,7 +51,6 @@ Follow the development: https://github.com/robocopAlpha/brewlog
'; ';
} }
VERSION
if [ ! -f "$LOGFILE" ] ; then if [ ! -f "$LOGFILE" ] ; then
# Creating brew.log # Creating brew.log
@ -60,11 +58,16 @@ if [ ! -f "$LOGFILE" ] ; then
mkdir -p "$(dirname "$LOGFILE")" mkdir -p "$(dirname "$LOGFILE")"
touch "$LOGFILE" touch "$LOGFILE"
fi fi
if [ $# -eq 0 ]; then
HELP
fi
if [ "$1" == "--help" ]; then if [ "$1" == "--help" ]; then
HELP HELP
elif [ "$1" == "--brew-help" ]; then elif [ "$1" == "--brew-help" ]; then
brew help brew help
elif [ "$1" == "--brew-help" ]; then elif [ "$1" == "version" ]; then
VERSION VERSION
elif [ "$1" == "tail" ]; then elif [ "$1" == "tail" ]; then
if [ "$2" == "-n" ]; then if [ "$2" == "-n" ]; then

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [ -w /usr/local/bin ]; then if [ -w /usr/local/bin ]; then
curl -sSL 'https://raw.githubusercontent.com/robocopAlpha/brewlog/master/brewlog.sh' > /usr/local/bin/brewlog curl -sSL 'https://raw.githubusercontent.com/robocopAlpha/brewlog/master/brewlog.sh' > /usr/local/bin/brewlog
chmod +x /usr/local/bin/brewlog chmod +x /usr/local/bin/brewlog