Skip to content

Commit

Permalink
Create install script, that will replace ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizlab committed Dec 6, 2020
1 parent f6392d1 commit 986c90c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conf.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/zsh -e
setopt pipefail

cd "$(dirname "$0")"

# We export PATH in case the variable is not exported yet
export PATH

# We add our own bins to the path, but agree to use the system or user-defined
# ones if they are already there
path+="$(pwd)/.cache/bin"

# Create cache dir
mkdir -p .cache
chmod 700 .cache

# Install ccrypt if needed
command -v ccdecrypt >/dev/null 2>&1 || {
echo "*** Downloading and compiling ccrypt in the .cache folder..."
pushd .cache
readonly CCRYPT_SHASUM="6d20a4db9ef7caeea6ce432f3cffadf10172e420"
readonly CCRYPT_VERSION="1.11"
readonly CCRYPT_BASENAME="ccrypt-$CCRYPT_VERSION"
readonly CCRYPT_TAR_NAME="$CCRYPT_BASENAME.tar.gz"
readonly CCRYPT_URL="http://ccrypt.sourceforge.net/download/$CCRYPT_VERSION/$CCRYPT_TAR_NAME"
test -e "$CCRYPT_TAR_NAME" || curl "$CCRYPT_URL" >"$CCRYPT_TAR_NAME"
test "$(shasum "$CCRYPT_TAR_NAME" | cut -d' ' -f1)" = "$CCRYPT_SHASUM" || {
echo "***** ERROR: ccrypt sha does not match expected sha. Bailing out."
exit 1
}
tar xf "$CCRYPT_TAR_NAME"
pushd "$CCRYPT_BASENAME"
./configure --prefix "$(pwd)/.."
make install
popd
rm -fr "$CCRYPT_BASENAME"
popd
}
Empty file modified run-ansible
100755 → 100644
Empty file.

0 comments on commit 986c90c

Please sign in to comment.