#!/bin/bash

# Check root permissions
mkdir -p /etc/root &> /dev/null
administrator=$?
if [ ${administrator} -eq 0 ] ; then
  rm -rf /etc/root
else
  echo ""
  echo "* Administrator permissions are required"
  echo ""
  exit
fi

#cd ~/.config/dwl
echo "" ; echo "# INSTALLING DWL"
echo ""
make install clean
cp -rfv scripts/foot-run /usr/bin/foot-run
cp -rfv dwl_start.sh /usr/bin/dwl-start
echo "" ; echo "# INSTALLING SOMEBAR (FOR DWL)"
cd somebar
./install.sh
echo "" ; echo "# INSTALLING BEMENU (FOR DWL)"
cd ../menu
./build-install.sh
echo "" ; echo "# FINISHED" ; echo ""
