#!/bin/sh # Wizard to install the Nvidia driver # Adapted for Klikit-Linux by Chris_(medico_2001) export XDIALOG_HIGH_DIALOG_COMPAT=1 DIALOG=Xdialog DIA=Xdialog $DIALOG --title "Klikit Wizard" \ --backtitle " Backup and Restore sources list " \ --radiolist "This wizard will Backup and Resore your sources list.\n This wizad will let you backup, and if needed restore your current sources (repository) list.\n You will also be able to go back to the original sources.list " 35 80 0 \ "Backup" "Will Backup your current sources.list" off \ "Restore" "Will restore the sources.list using the last Backup you did" off \ "Original" "Will restore to the Original sources.list" off \ "Exit" "Close this wizard" off 2> /tmp/checklist.tmp.$$ retval=$? if [ $retval = 1 ]; then exit 0 fi choice=`cat /tmp/checklist.tmp.$$` rm -f /tmp/checklist.tmp.$$ if [ "$choice" = "Exit" ]; then exit 0 fi # ----------------------------------- if [ "$choice" = "Backup" ]; then kdesu cp -rf /etc/apt/sources.list /etc/apt/sources.list.current kdialog --title="klikit info" --msgbox "Your sources.list file was backed up successfully" fi # ----------------------------------- if [ "$choice" = "Restore" ]; then kdesu cp -rf /etc/apt/sources.list.current /etc/apt/sources.list xterm -e sudo apt-get update kdialog --title="klikit info" --msgbox "Your sources.list file was successfully restored using the last backup you did, and it is ready to be used" fi # ----------------------------------- if [ "$choice" = "Original" ]; then kdesu cp -rf /etc/apt/sources.list.backup /etc/apt/sources.list xterm -e sudo apt-get update kdialog --title="klikit info" --msgbox "Your sources.list file was successfully restored to its original state, and it is ready to be used" fi # -----------------------------------