aboutsummaryrefslogtreecommitdiff
path: root/uninstall.sh
blob: 380b925af4f0e83af860ba73da49adb30cc54315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
printf "Arching Kaos Tools - Uninstaller\n"
printf "--------------------------------\n"
if [ -d "$AK_WORKDIR" ] ; then printf "No arching-kaos found... Aborting...\n"; exit 1; fi
printf "Backing up your GPG keyring..."
tar cfz $AK_ROOT/aknet-gpg-keyring-backup-`date -u +%Y%m%d`.tar.gz $AK_GPGHOME
if [ $? -ne 0 ]
then
    printf "\tFailed! Aborting...\n"
    exit 1
fi
printf "\tOK!\n"

printf "Removing %s..." "$AK_WORKDIR"
rm -rf $AK_WORKDIR
if [ $? -ne 0 ]
then
    printf "\tFailed! Aborting...\n"
    exit 1
fi
printf "\tOK!\n"

printf "Unsetting sourcing from .bashrc ..."
sed -i.bak -e 's/source.*arching-kaos\/rc//g' $HOME/.bashrc
if [ $? -ne 0 ]
then
    printf "\tFailed! Aborting...\n"
    exit 1
fi
printf "\tOK!\n"

printf "Resourcing .bashrc..."
source $HOME/.bashrc
if [ $? -ne 0 ]
then
    printf "\tFailed! Aborting...\n"
    exit 1
fi
printf "\tOK!\n"