Skip to content

Instantly share code, notes, and snippets.

@glamrock
Created June 6, 2013 15:34
Show Gist options
  • Save glamrock/5722464 to your computer and use it in GitHub Desktop.
Save glamrock/5722464 to your computer and use it in GitHub Desktop.
commotion removal
#!/bin/bash
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Authors:
# Griffin Boyce
#
# Description:
# A simple Commotion removal script
#
# Legal Stuff:
# GPL3
#
echo ''
echo ' __ __ _ _ _ _ _ _ __ _|_ o __ _ _ '
echo '/ / \_/ |/ |/ | / |/ |/ | / \_| | / \_/ |/ | '
echo '\___/\__/ | | |_/ | | |_/\__/ |_/|_/\__/ | |_/'
echo ''
echo "Sorry to see you go! ='("
#----- FUNCTIONS -----#
# CLEAN ENVIRONMENT FIRST
function domino {
# Empty various cache files
echo 'Preparing to remove Commotion'
echo 'Requires administrator privileges:'
sudo apt-get purge commotion-mesh-applet -y -qq
sudo apt-get autoremove -y -qq
sudo apt-get autoclean -y -qq
# Check for broken packages
echo 'Checking software integrity'
sudo apt-get -f install -y -qq
# Remove leftover files
echo 'Removing leftover packages...'
sudo apt-get autoremove -y -qq
echo 'Cleaning up temporary cache...'
sudo apt-get autoclean -y -qq
echo 'Done.'
sleep 3
clear
echo 'Please restart your session to finish removal.'
logout
}
#logout dialogue
function logout {
echo ''
read -p "(O)kay! / (N)o, I'll log off later."
if [ '$REPLY' == 'o' ]; then
sudo gnome-session-save --logout
else
echo 'Please log out to complete Commotion configuration.'
exit
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment