From cdecdb25ca1cf00fdfd491038dedbcb2c04b154d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 17 Jan 2015 23:07:02 +0300 Subject: [PATCH] mc.menu: compress the current subdirectory to 7z --- .mc/menu | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5