Jump to content
hippytaff

efix.sh

Recommended Posts

I did this for fun. Thought it might come in handy. It's a script to backup ~/.e so that e is regenerated when updates kill e. If that makes sense :/

 

If you run the script with no arguments, it will automatically back ~/.e to ~/.e_bkup. To run it open a terminal in the diretory it is in

./efix.sh

 

You can use the following flags for further options -

./efix.sh -s

or

./efix.sh --suppress

 

to remove ~/.e and restart E without backing up first.

 

./efix.sh -b

or

./efix.sh --backup

 

To backup ~/.e without removing it.

 

Simple script. Some people might find it useful. As always see -h or --help for..well help (which will basically say what I just said)

 

Cheers

Hippytaff

 

#!/bin/bash

#################################################
#   Fix .e post Enlightenment update .e death   #
# License: WTFPL :see http://sam.zoy.org/wtfpl/ #
#  Comes with absolutely no warranty yada yada  #
#                Hippytaff			#
#################################################

function call_parse_cli
{
if [ -z "$1" ]
then
call_backup
call_fix

elif [ "$1" == "-h" ]||[ "$1" == "--help" ]
then
call_help

elif [ "$1" == "-s" ]||[ "$1" == "--supress" ]
then
call_fix

elif [ "$1" == "-b" ]||[ "$1" == "--backup" ]
then
call_backup

else

echo "invalid argument."
echo "see --help "
fi
exit 1
}

function call_help
{
echo
echo "		~/.e is backed up as ~/.e_bkup by default"
echo "		regenerate e without backing up...-s or --supress"
echo "		backup without regenerating .e....-b or --backup"
echo
}

function call_backup
{
cp -r ~/.e ~/.e_bkup
echo "Backing up ~/.e to ~/.e_bkup"
echo

}

function call_fix
{
rm -r ~/.e
enlightenment_remote -restart 
}

call_parse_cli "$1"

 

Copy and paste to a text editor and save as efix.sh (for the instructions and --help to make sense). Make the file executable...away to go :)

Share this post


Link to post
Share on other sites

Hi hippytaff,

nois good, very good, your script.

 

It is OK for you if I include for me 'dialog' in your script?

 

I like grafik-Apps, so too in terminal with select, make/set marker or unset, press final ENTER and let run the script.

Share this post


Link to post
Share on other sites

×