MX PRODIGY 17 wrote:It's funny cause it's JLV
saf extractor
-
- Posts: 2106
- Joined: Sun Feb 05, 2012 7:23 am
- Team: Aspect Visual Co.
- Location: Illinois/Wisconsin
Re: saf extractor
Re: saf extractor
jlv wrote:Here you go:
Code: Select all
#!/bin/bash # # Simple Archive Format # #set -C if test "_$1_" = _c_ then shift find "$@" -maxdepth 0 -printf '%s %p\n' echo - cat "$@" elif test "_$1_" = _x_ then shift count=0 while read size name && test "_${size##[^0-9]}_" = "_${size}_" do sizes[count]=$((size)) names[count]=${name} count=$((count+1)) done if test "_${size}_" != "_-_" then echo "Bad dir" exit fi i=0 while let 'i<count' do echo ${names[i]} ${sizes[i]} if test "_${names[i]##*/}_" != "_${names[i]}_" then install -d "${names[i]%/*}" fi dd bs=${sizes[i]} count=1 >"${names[i]}" 2>/dev/null i=$((i+1)) done else echo "To create an archive use: saf.sf c files..." echo "To extract an archive use: saf.sf x" fi
I am not designed to come second or third. I am designed to win. - Ayrton Senna
-
- Posts: 4132
- Joined: Tue Oct 21, 2008 5:20 pm
- Location: Washington, USA
- Contact:
-
- Posts: 305
- Joined: Sun May 27, 2012 10:34 pm
- Team: BakerMX.com
- Location: Charlotte, NC
- Contact:
Re: saf extractor
Ooooh no Unix love.. just Linux..?wheels1758 wrote:jlv wrote:If you don't use Linux then FU!
It is possible to run this in windows, with cygwin.
jlv I am jealous of your bash knowledge.
Justin Baker | BakerMX.com #51
AWood wrote:WOOO BAKER
AWood wrote:Your excuses are about as shitty as mike Alessi on pulp MX show
Re: saf extractor
There might be some line ending issues in Cygwin. If there's a way to force it to binary mode it should work fine.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: saf extractor
someone shoot me a link.
-
- Crushed Dissenter
- Posts: 525
- Joined: Sat Mar 07, 2015 6:41 pm
- Team: Quality designs
- Location: ohio
- Contact:
Re: saf extractor
Just search puremxs saf extracter
Do skins cheap!!!!
If you enjoy my content please donate https://www.paypal.me/ByrdGreen
Feel free to visit my facebook: https://www.facebook.com/556Designs/
If you enjoy my content please donate https://www.paypal.me/ByrdGreen
Feel free to visit my facebook: https://www.facebook.com/556Designs/
Re: saf extractor
You have the code on page 1, why would you need a link?ty casey wrote:someone shoot me a link.
Discord: StorkeN#6883 - StorkenMXS Youtube - StorkenMXS Instagram - StorkenMXS Facebook - TMFR on Faceboook
Re: saf extractor
do i just turn that into a .exe?
Re: saf extractor
Make it a shell script that you run.
Discord: StorkeN#6883 - StorkenMXS Youtube - StorkenMXS Instagram - StorkenMXS Facebook - TMFR on Faceboook
Re: saf extractor
jlv wrote:Here you go:
[code]#!/bin/bash
#
# Simple Archive Format
#
#set -C
if test "_$1_" = _c_
then
shift
find "$@" -maxdepth 0 -printf '%s %p\n'
echo -
cat "$@"
elif test "_$1_" = _x_
then
shift
count=0
while read size name && test "_${size##[^0-9]}_" = "_${size}_"
do
sizes[count]=$((size))
names[count]=${name}
count=$((count+1))
done
if test "_${size}_" != "_-_"
then
echo "Bad dir"
exit
fi
i=0
while let 'i<count'
do
echo ${names} ${sizes}
if test "_${names##*/}_" != "_${names}_"
then
install -d "${names%/*}"
fi
dd bs=${sizes} count=1 >"${names}" 2>/dev/null
i=$((i+1))
done
else
echo "To create an archive use: saf.sf c files..."
echo "To extract an archive use: saf.sf x"
fi
[/code]
Sitting here doing this for fun. For some reason when I try to open an older .saf archive (from the old "needed object packs") I get the error message "Bad Dir" after trying:
./saf.sf x
NewTreespack.saf
Saf.sf is the script and NewTreespack.saf is what I am trying to open... Any clues?
Discord: StorkeN#6883 - StorkenMXS Youtube - StorkenMXS Instagram - StorkenMXS Facebook - TMFR on Faceboook
Re: saf extractor
You have to redirect the saf as the standard input:
./saf.sf x <NewTreespack.saf
Without the redirect op < it should have just hung waiting for input until you pressed ctrl-c or ctrl-d.
./saf.sf x <NewTreespack.saf
Without the redirect op < it should have just hung waiting for input until you pressed ctrl-c or ctrl-d.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: saf extractor
Thanks! That worked. I though the new line after "./saf.sf x" was enough to insert "NewTreespack.saf" on, but apparently it wasn't. Thanks again!jlv wrote:You have to redirect the saf as the standard input:
./saf.sf x <NewTreespack.saf
Without the redirect op < it should have just hung waiting for input until you pressed ctrl-c or ctrl-d.
Discord: StorkeN#6883 - StorkenMXS Youtube - StorkenMXS Instagram - StorkenMXS Facebook - TMFR on Faceboook
Re: saf extractor
sorry, can anyone explain me how should i run it? i really can't get it