From ec8aefe148fbe9ddd0f071a6bb02cf92291d2223 Mon Sep 17 00:00:00 2001 From: Matteo Pasotti Date: Mon, 19 Aug 2013 19:36:12 +0200 Subject: SILENT: remove create_link script --- extras/create_link.sh | 62 --------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100755 extras/create_link.sh (limited to 'extras') diff --git a/extras/create_link.sh b/extras/create_link.sh deleted file mode 100755 index 0e6a51e..0000000 --- a/extras/create_link.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# vim: set et ts=4 sw=4: - -apanel=`rpm --eval %perl_privlib`/AdminPanel - -function check_root_permissions -{ - if [[ $EUID -ne 0 ]]; then - echo "You must be root to run this script" 1>&2 - exit 1 - fi -} - -function uninstall -{ - echo "== Uninstalling AdminPanel..." - if [ -L $apanel ] - then - unlink $apanel - fi - - if [ -f /usr/share/polkit-1/actions/org.mageia.policykit.pkexec.adminpanel.policy ] - then - rm /usr/share/polkit-1/actions/org.mageia.policykit.pkexec.adminpanel.policy - fi - - if [ -f /usr/bin/apanel.pl ] - then - unlink /usr/bin/apanel.pl - fi - echo "== Removed" -} - -function setup { - echo "== Installing AdminPanel..." - pushd . - cd .. - cp extras/org.mageia.policykit.pkexec.adminpanel.policy /usr/share/polkit-1/actions/ - ln -s $PWD/AdminPanel `rpm --eval %perl_privlib` - ln -s $PWD/apanel.pl /usr/bin - popd - echo "== Done" -} - -function usage { - echo "Usage:" - echo "--remove uninstall AdminPanel references" - echo "--install install AdminPanel references" -} - -check_root_permissions - -while getopts "hri" OPTIONS -do - case $OPTIONS in - r ) uninstall ;; - i ) uninstall && setup ;; - h ) usage ;; - \? ) usage ;; - esac -done - -- cgit v1.2.1