mirror of
https://github.com/linuxmint/timeshift.git
synced 2024-08-17 04:20:34 +03:00
Remove timeshift-uninstall binary (#176)
The user should use related packet management system to uninstall timeshift.
This commit is contained in:
parent
0d8d1de8bf
commit
5a44146762
10
README.md
10
README.md
@ -174,16 +174,14 @@ Run the following command in a terminal window:
|
||||
|
||||
sudo apt-get remove timeshift
|
||||
|
||||
or
|
||||
or
|
||||
|
||||
sudo timeshift-uninstall
|
||||
sudo dnf remove timeshift
|
||||
|
||||
depending in your package management system.
|
||||
|
||||
Remember to delete all snapshots before un-installing. Otherwise the snapshots continue to occupy space on your system. To delete all snapshots, run the application, select all snapshots from the list (CTRL+A) and click the _Delete_ button on the toolbar. This will delete all snapshots and remove the _/timeshift_ folder in the root directory.
|
||||
|
||||
If you used the installer to install Timeshift, you can remove the installed files with following command:
|
||||
|
||||
sudo timeshift-uninstall
|
||||
|
||||
## Known Issues & Limitations
|
||||
|
||||
#### BTRFS volumes
|
||||
|
@ -97,7 +97,6 @@ install:
|
||||
# binary
|
||||
install -m 0755 ${app_name} "$(DESTDIR)$(bindir)"
|
||||
install -m 0755 ${app_name}-gtk "$(DESTDIR)$(bindir)"
|
||||
#install -m 0755 ${app_name}-uninstall "$(DESTDIR)$(bindir)"
|
||||
install -m 0755 ${app_name}-launcher "$(DESTDIR)$(bindir)"
|
||||
|
||||
# shared files
|
||||
@ -139,7 +138,6 @@ uninstall:
|
||||
# binary
|
||||
rm -f "$(DESTDIR)$(bindir)/${app_name}"
|
||||
rm -f "$(DESTDIR)$(bindir)/${app_name}-gtk"
|
||||
rm -f "$(DESTDIR)$(bindir)/${app_name}-uninstall"
|
||||
rm -f "$(DESTDIR)$(bindir)/${app_name}-launcher"
|
||||
|
||||
# shared files
|
||||
|
@ -1,140 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
app_name='timeshift'
|
||||
app_fullname='Timeshift'
|
||||
|
||||
Reset='\e[0m'
|
||||
Red='\e[1;31m'
|
||||
Green='\e[1;32m'
|
||||
Yellow='\e[1;33m'
|
||||
|
||||
CHECK_COLOR_SUPPORT() {
|
||||
colors=`tput colors`
|
||||
if [ $colors -gt 1 ]; then
|
||||
COLORS_SUPPORTED=0
|
||||
else
|
||||
COLORS_SUPPORTED=1
|
||||
fi
|
||||
}
|
||||
|
||||
MSG_INFO() {
|
||||
add_newline=''
|
||||
if [ "$2" == 0 ]; then
|
||||
add_newline='-n'
|
||||
fi
|
||||
|
||||
if [ $COLORS_SUPPORTED -eq 0 ]; then
|
||||
echo -e ${add_newline} "[${Yellow}*${Reset}] ${Green}$1${Reset}"
|
||||
else
|
||||
echo -e ${add_newline} "[*] $1"
|
||||
fi
|
||||
}
|
||||
|
||||
MSG_WARNING() {
|
||||
add_newline=''
|
||||
if [ "$2" == 0 ]; then
|
||||
add_newline='-n'
|
||||
fi
|
||||
|
||||
if [ $COLORS_SUPPORTED -eq 0 ]; then
|
||||
echo -e ${add_newline} "[${Red}!${Reset}] ${Yellow}$1${Reset}"
|
||||
else
|
||||
echo -e ${add_newline} "[!] $1"
|
||||
fi
|
||||
}
|
||||
|
||||
MSG_ERROR() {
|
||||
add_newline=''
|
||||
if [ "$2" == 0 ]; then
|
||||
add_newline='-n'
|
||||
fi
|
||||
|
||||
if [ $COLORS_SUPPORTED -eq 0 ]; then
|
||||
echo -e ${add_newline} "[${Red}X${Reset}] ${Yellow}$1${Reset}"
|
||||
else
|
||||
echo -e ${add_newline} "[X] $1"
|
||||
fi
|
||||
}
|
||||
|
||||
CD_PUSH() {
|
||||
cd_backup=`pwd`
|
||||
}
|
||||
|
||||
CD_POP() {
|
||||
if [ ! -z "${cd_backup}" ]; then
|
||||
cd "${cd_backup}"
|
||||
fi
|
||||
}
|
||||
|
||||
EXIT(){
|
||||
CD_POP
|
||||
exit $1
|
||||
}
|
||||
|
||||
WAIT_FOR_INPUT() {
|
||||
echo ""
|
||||
echo "Press any key to exit..."
|
||||
read dummy
|
||||
}
|
||||
|
||||
GET_SCRIPT_PATH(){
|
||||
SCRIPTPATH="$(cd "$(dirname "$0")" && pwd)"
|
||||
SCRIPTNAME=`basename $0`
|
||||
}
|
||||
|
||||
RUN_AS_ADMIN() {
|
||||
if [ ! `id -u` -eq 0 ]; then
|
||||
GET_SCRIPT_PATH
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
sudo "${SCRIPTPATH}/${SCRIPTNAME}"
|
||||
EXIT $?
|
||||
elif command -v su >/dev/null 2>&1; then
|
||||
su -c "${SCRIPTPATH}/${SCRIPTNAME}"
|
||||
EXIT $?
|
||||
else
|
||||
echo ""
|
||||
MSG_ERROR "** Uninstaller must be run as Admin (using 'sudo' or 'su') **"
|
||||
echo ""
|
||||
EXIT 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
CD_PUSH
|
||||
CHECK_COLOR_SUPPORT
|
||||
RUN_AS_ADMIN
|
||||
|
||||
if [ ! -z "${app_name}" ]; then
|
||||
rm -f "/usr/bin/${app_name}"
|
||||
rm -f "/usr/bin/${app_name}-uninstall"
|
||||
rm -f "/usr/share/applications/${app_name}.desktop"
|
||||
rm -f "/usr/share/pixmaps/${app_name}.png"
|
||||
rm -rf "/usr/share/${app_name}"
|
||||
rm -rf "/usr/share/doc/${app_name}"
|
||||
rm -f /usr/share/locale/*/LC_MESSAGES/${app_name}.mo
|
||||
|
||||
if [ -d /timeshift ]; then
|
||||
remove_backups=n
|
||||
MSG_INFO "Remove backups on system partition? (y/n):" "0"
|
||||
read remove_backups
|
||||
if [ "$remove_backups" == "" ]; then
|
||||
remove_backups=n
|
||||
fi
|
||||
|
||||
if [ "$remove_backups" == "y" ]; then
|
||||
MSG_INFO "Freeing disk space..."
|
||||
echo ""
|
||||
rm -rf "/timeshift"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "${app_fullname} was uninstalled successfully."
|
||||
EXIT 0
|
||||
else
|
||||
echo "Uninstalled completed (some files could not be removed)"
|
||||
EXIT 1
|
||||
fi
|
||||
|
||||
CD_POP
|
Loading…
Reference in New Issue
Block a user