2018-11-13 19:38:32 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# End the script on any errors
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Change the working directory to this one
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2018-11-14 21:05:25 +01:00
|
|
|
# Get administrative privileges
|
|
|
|
sudo -v
|
|
|
|
|
|
|
|
# Keep pinging sudo until this script finishes
|
|
|
|
# Source: https://gist.github.com/cowboy/3118588
|
|
|
|
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
|
|
|
|
2018-11-13 19:38:32 +01:00
|
|
|
# Install dependencies
|
2018-11-14 21:05:25 +01:00
|
|
|
sudo -n dnf install -y make fedpkg
|
2018-11-13 19:38:32 +01:00
|
|
|
|
|
|
|
# Run make
|
|
|
|
make
|
2018-11-14 21:05:25 +01:00
|
|
|
|
2018-11-18 09:35:39 +01:00
|
|
|
# Run vim for the first time (i.e. install plugins and exit)
|
|
|
|
nvim
|
|
|
|
|
2018-11-14 21:05:25 +01:00
|
|
|
# Revoke privileges
|
|
|
|
sudo -K
|