Raised This Month: $ Target: $400
 0% 

[BATCH] FastDL .bz2 recursive bzip2 compress


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-04-2015 , 17:35   Re: [BATCH] FastDL .bz2 recursive bzip2 compress
Reply With Quote #1

Is the compress directory even used in your version?

Anyway, here's a Linux version named bzip.sh, although it does require the Bash shell as it uses bash constructs such as GLOBIGNORE.

Apparently you can't attach bz2 files on AlliedModders. Which is a shame as generally Linux distros already have them installed.

Note that this Bash script makes a copy of the files before compressing them. It was either that or do it in place and move the bz2 files after the fact... which would create problems if you had other bz2 files already around.

Code:
#!/bin/bash

GLOBIGNORE="./bzip.sh:./compress"

if [ ! -d compress ]
then
        mkdir compress
fi

cp -r ./* compress

find compress/ -type f ! -name "*.bz2" -exec bzip2 {} +
Attached Files
File Type: zip bzip.zip (284 Bytes, 503 views)
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode