unfinished template for crystal lang installer
This commit is contained in:
parent
b688849dd0
commit
b06de31fb1
34
crystal-installer.sh
Normal file
34
crystal-installer.sh
Normal file
@ -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_(){
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user