debmaker/ressources/authelia/authelia

41 lines
1.1 KiB
Text
Raw Normal View History

2022-02-12 18:30:28 +01:00
#!/bin/bash
envinit() {
apt install -y build-essential git wget ca-certificates
wget -qO - https://deb.nodesource.com/setup_16.x | bash
#wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
#echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y nodejs
wget -qO - https://go.dev/dl/go1.17.3.linux-amd64.tar.gz | tar -C /usr/local -xz
wget -qO - https://get.pnpm.io/install.sh | sh -
}
prebuild(){
VERSION=$1
cd /tmp/
git clone https://github.com/authelia/authelia.git
cd authelia/
git checkout $VERSION
}
build() {
cd /tmp/authelia/
. /root/.bashrc
PATH=$PATH:/usr/local/go/bin bash bootstrap.sh
PATH=$PATH:/usr/local/go/bin ./cmd/authelia-scripts/authelia-scripts build
}
makedeb(){
PATH_BUILD=$1
PATH_DEB=$2
GIT_VERSION=$3
cp ${PATH_BUILD}/tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia
cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml
}
echo $1
FUNC=$1
shift
${FUNC} $*