25 lines
537 B
Bash
Executable File
25 lines
537 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
run_directory=$(dirname $(readlink -f "$0"))
|
|
user=$(whoami)
|
|
|
|
source "$run_directory/variables.conf"
|
|
|
|
if [ -f $run_directory/.disabled ]; then
|
|
echo "Installation is disabled. Exiting..."
|
|
exit 0
|
|
fi
|
|
|
|
if [[ $user != 'root' ]]; then
|
|
sudo="sudo"
|
|
else
|
|
sudo=""
|
|
fi
|
|
|
|
echo "Copying APT hook to APT conf directory..."
|
|
$sudo cp $run_directory/99build-uki /etc/apt/apt.conf.d/99build-uki
|
|
$sudo sed -i -e "s:PH_PATH:$run_directory/build-uki.sh:g" /etc/apt/apt.conf.d/99build-uki
|
|
|
|
echo "Finished install. Exiting..."
|
|
exit 0
|