mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
Work in progress on integrating build server
This commit is contained in:
parent
d6e390afd6
commit
498e7d3c5f
14 changed files with 334 additions and 116 deletions
23
buildserver/fixpaths.sh
Normal file
23
buildserver/fixpaths.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
fixit()
|
||||
{
|
||||
#Fix sudoers so the PATH gets passed through, otherwise chef
|
||||
#provisioning doesn't work.
|
||||
if [ -z "$1" ]; then
|
||||
export EDITOR=$0 && sudo -E visudo
|
||||
else
|
||||
echo "Fix sudoers"
|
||||
echo "Defaults exempt_group=admin" >> $1
|
||||
fi
|
||||
#Stick the gems bin onto root's path as well.
|
||||
sudo echo "PATH=$PATH:/var/lib/gems/1.8/bin" >>/root/.bashrc
|
||||
# Restart sudo so it gets the changes straight away
|
||||
sudo /etc/init.d/sudo restart
|
||||
}
|
||||
|
||||
sudo grep "exempt_group" /etc/sudoers -q
|
||||
if [ "$?" -eq "1" ]; then
|
||||
fixit
|
||||
fi
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue