Skip to content

Commit

Permalink
Rel. 0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
massenz committed Oct 18, 2022
2 parents b6c4a96 + 3ffc4f1 commit 25e7922
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name: Build & Test

on:
push:
branches: [ develop ]
branches: [ main ]
pull_request:
branches: [ develop ]
branches: [ main ]

env:
PYTHONPATH: '.'
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ The easiest way to install is to use the installer script:
```shell
export COMMON_UTILS=/path/to/common-utils
export VERSION=...
http -b https://cdn.githubraw.com/massenz/common-utils/$VERSION/install.sh | zsh -s
curl -s -L https://cdn.githubraw.com/massenz/common-utils/$VERSION/install.sh | zsh -s
```

with a recent [Release](https://github.com/massenz/common-utils/releases) for the `VERSION` string.

> **NOTE**<br/>
> **NOTE**
>
> If you are using the Bourne Shell (`bash`) replace `zsh` in the command above with `bash`
> **NOTE**<br/>
> This requires the [httpie](https://httpie.io) package, as `wget` seems to choke on verifying GitHub's SSL Certificates

The initialization necessary to use the `common-utils` is written out to `$HOME/.commonrc` either copy it to your shell's initialization script (`.zshrc` if you are using the Z Shell; `.bashrc` for the Bourne Shell) or source it directly from there.

Alternatively, you can simply download the tarball from the Releases page and do the above manually; this is what is needed to properly use the utils, in your `.zshrc`:
Expand Down
12 changes: 2 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
set -eu
echo "Installing common-utils Rel. $VERSION to $COMMON_UTILS"

if [[ ! -x http ]]
then
echo "ERROR: Missing httpie package, please see https://httpie.io/download"
exit 1
fi

declare -r TARBALL="https://github.com/massenz/common-utils/releases/download/$VERSION/common-utils-$VERSION.tar.gz"
declare -r DEST=$(mktemp -d)

echo "Installing common-utils Rel. $VERSION to $COMMON_UTILS"
if [[ ! -d ${COMMON_UTILS} ]]
then
mkdir -p ${COMMON_UTILS}
fi
http -d -o /tmp/common-utils.tar.gz ${TARBALL}
tar xf /tmp/common-utils.tar.gz -C ${COMMON_UTILS}
curl -s -L ${TARBALL} | tar x -C ${COMMON_UTILS}

source ${COMMON_UTILS}/utils
success "Utilities installed to ${COMMON_UTILS}"
Expand Down

0 comments on commit 25e7922

Please sign in to comment.