From b06de31fb126ab2e506df17b6ff62abb61d6cc0a Mon Sep 17 00:00:00 2001 From: mollusk Date: Sun, 11 Jun 2017 18:39:28 -0700 Subject: [PATCH] unfinished template for crystal lang installer --- crystal-installer.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 crystal-installer.sh 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_(){ + +} +