pk rar added

This commit is contained in:
Kolan Sh 2012-06-06 12:03:30 +04:00
parent 08ee087646
commit 580f48a9de
1 changed files with 4 additions and 4 deletions

View File

@ -21,9 +21,9 @@ extract () {
|| bunzip2 -c $1 > ${1%.bz2} ;;
*.gz) gunzip -c $1 > ${1%.gz} ;;
*.xz) unxz -c $1 > ${1%.xz} ;;
*.rar) unrar x $1 ;; # FIXME: test
*.rar) unrar x $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;; # FIXME: test
#*.Z) uncompress $1 ;; # FIXME: test
*.7z) 7z x $1 ;;
*) echo "I don't know how to extract '$1'..." ;;
esac
@ -48,9 +48,9 @@ pk () {
|| bzip2 -9 -c $2 > $2.bz2 ;;
g*z) gzip -c -9 -n $2 > $2.gz ;;
x*z) xz -c -9 $2 > $2.xz ;;
rar) ;; # FIXME: test
rar) rar a $2.rar $2 -m5 ;;
zip) zip -9 -r $2.zip $2 ;;
Z) ;; # FIXME: test
#Z) ;; # FIXME: test
7z) 7z -mx=9 a $2.7z $2 ;;
*) echo "'$1' cannot be packed via pk()" ;;
esac