From: Oleg Broytman Date: Sat, 17 Jan 2015 20:07:02 +0000 (+0300) Subject: mc.menu: compress the current subdirectory to 7z X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=cdecdb25ca1cf00fdfd491038dedbcb2c04b154d mc.menu: compress the current subdirectory to 7z --- diff --git a/.mc/menu b/.mc/menu index ac3656b..901c90b 100644 --- a/.mc/menu +++ b/.mc/menu @@ -247,6 +247,15 @@ y Compress the current subdirectory to zip with recoded filenames cd .. && zip.py "$zip".zip "$Pwd" && echo ../"$zip".zip created. ++ t d & f ^\.\.$ +7 Compress the current subdirectory to 7z + Pwd="`basename %d /`" + echo -n "Name of the distribution file (without extension) [$Pwd]: " + read ar + if [ "$ar"x = x ]; then ar="$Pwd"; fi + cd .. && 7zr a "$ar".7z "$Pwd" && + echo ../"$ar".7z created. + + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$ & t r z bzip2 the file exec bzip2 -9 %f