diff --git a/crystal-installer.sh b/crystal-installer.sh new file mode 100644 index 0000000..21ddb14 --- /dev/null +++ b/crystal-installer.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +NAME="crystal" +VERSION="0.22.0-1" +ARCH="x86_64" +PREFIX="/usr" +TMP="/tmp" +URL="https://github.com/crystal-lang/crystal/releases/download/0.22.0/${NAME}-${VERSION}-linux-${ARCH}.tar.gz" + + + +download_(){ + printf "Downloading ${NAME}-${VERSION}-${ARCH}...\n" + wget ${URL} -P ${TMP} +} + +extract_(){ + printf "Ectracting archive file to ${TMP}...\n" + cd ${TMP} + tar xvf ${NAME}-${VERSION}-linux-${ARCH}tar.gz +} + +install_(){ + printf "Copying files to system..\n" + cd ${TMP}/${NAME}-${VERSION}/embedded + cp -r {bin,include,lib,share} ${PREFIX}/ + +} + + +link_(){ + +} +