New dependancy methode
This commit is contained in:
parent
cc93246273
commit
9359602185
5 changed files with 47 additions and 28 deletions
|
@ -1,4 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
configure_depot_yarn() {
|
||||
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
|
||||
}
|
||||
|
||||
configure_depot_nodejs() {
|
||||
NODE_VERSION=16.x
|
||||
[ ! "$1" == "" ] && NODE_VERSION=$1
|
||||
grep -q 16.x /etc/apt/sources.list.d/nodesource.list
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
if [ ! -e /usr/bin/wget ]
|
||||
then
|
||||
apt update
|
||||
apt install wget
|
||||
fi
|
||||
wget -qO - https://deb.nodesource.com/setup_${NODE_VERSION} | bash
|
||||
fi
|
||||
}
|
||||
|
||||
install_go() {
|
||||
GO_VERSION=1.19
|
||||
[ ! "$1" == "" ] && GO_VERSION=$1
|
||||
PATH=$PATH:/usr/local/go/bin
|
||||
if [ ! "$(go version)" == "go version go${GO_VERSION} linux/amd64" ] ;
|
||||
then
|
||||
rm -rvf /usr/local/go/
|
||||
wget -qO - https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [ ! "$1" == "" ];
|
||||
then
|
||||
source /tmp/src/debmaker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue