burnWithGrowisofs
chunkylover
Source (link to git-repo or to original if based on someone elses unmodified work):
1.0.2: Don't panic if a directory contains no backup files. Also, put the actions in a submenu. These fixes courtesy of Micha Scholl.
1.0.1: small improvement to install script.
1.0: Initial release
Ratings & Comments
8 Comments
There is a little Problem in the way the script generates the installation paths. On some Systems like my suse box the call of kde-config --localprefix may result in a path with appending / so that you will have a // in the complete path the following after the generation of complete paths will fix this: PGLOBAL=${PGLOBAL/'\/\/'/'/'} PLOCAL=${PLOCAL//'\/\/'/'/'} KDIALOG=${KDIALOG//'\/\/'/'/'}
Thanks for the fix. Isn't it true that a double // in a path is harmless, though?
it seems that you are right but i think there must be a problem without the fix but i do not remember what it was cu Hajo
Please download 1.0.2. Thanks to Micha Scholl, it will no longer complain when the target directory doesn't contain backup files. Thanks Micha!
Hello, I'm the author of cleanbak. Please be aware that if you try to move backup files to Trash on a directory in which there are no backup files, you'll get some bizarre error message about the mv command not being recognized. I believe this error message appears because mv throws an error if the source file does not exist. I need to avoid or suppress this error, so that konqueror doesn't panic. So, I have been trying for a few hours to write an Exec command using bash to check whether backup files exist before trying to move them, but I have not been successful. Here is my latest unsuccessful attempt: Exec=/bin/sh -c 'path=%u; t=$path/*~; if [ $t != "$path/*~" ]; then mv -f $path/*~ ~/Desktop/Trash 2>/dev/null; fi' So, if backup files exist, then t is a space-separated list of the backup files. If no backup files exist, then t is assigned the literal string "$path/*~" (with $path expanded). That's why I only execute the mv command if $t != "$path/*~". It's an ugly kludge, but it does work in a test shell script I wrote. It just doesn't work in the cleanbak.desktop file: the mv command is never attempted, whether backup files exist or not. If anyone has advice or ideas on how to make it work properly, please let me know!
What about something like: for each in `ls -1 %u/*~`; do mv $each ~/Desktop/Trash/; done
you can use something like that: [ -e filename ]&& mv -f filename /mytrash
No, this does not work if the target directory contains more than one backup file. If I do something like: if [ -e %u/*~ ]; then mv -f %u/*~ ~/Desktop/Trash; fi as you are suggesting, then the "*" is expanded to a space-separated list of all the matching files in the directory. -e expects only one argument, so the command fails. That's why I was trying the more convoluted statement I originally posted.