jitty-scripts/crystal-installer.sh

35 lines
589 B
Bash
Executable File

#!/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_(){
}