reno/extra/install_luapam.sh

27 lines
704 B
Bash
Raw Normal View History

2022-08-31 12:20:58 +00:00
#!/bin/bash
#This script builds luapam module for the appropriate lua version
#Lua-pam is needed by the lock screen widget
doasroot() {
nohup which sudo > /dev/null
if [ "$?" != "0" ]; then
doas $@
else
sudo $@
fi
}
LUA_VERSION=$(awesome --version | \
grep -Po "(?<=Compiled against Lua )5\.\d")
if [ "$LUA_VERSION" == "" ]; then
echo "Unable to detect the lua version which awesome uses"
exit 1
fi
echo "Target version: $LUA_VERSION"
git clone --recursive https://github.com/devurandom/lua-pam lua-pam
cd lua-pam
2022-08-31 12:20:58 +00:00
make LUA_VERSION="$LUA_VERSION"
mkdir -p ../pam/
cp LICENSE ../pam/
echo "https://github.com/devurandom/lua-pam" > ../pam/README
cp pam.so ../
2022-08-31 12:20:58 +00:00