Anyone Know A .saf Creator For Mac
-
- Posts: 7
- Joined: Tue Feb 11, 2020 6:18 am
- Team: Privateer
Anyone Know A .saf Creator For Mac
just wondering if anyone knows a .saf creator that works on Mac or if anyone has a working python script for the latest version of python and could explain how to use the script, any help would be much appreciated.
Re: Anyone Know A .saf Creator For Mac
Here's a bash script I use on Linux. I'm pretty sure people have used this on Macs before.
Code: Select all
#!/bin/bash
#
# Simple Archive Format
#
#set -C
if test "_$1_" = _c_
then
shift
for f in "$@"
do
if ! test -f "$f"
then
echo 1>&2 "error: $f is not a regular file"
exit 1
fi
wc -c "$f" | (read size name; echo "$size $f")
done
echo -
cat "$@"
else
echo "To create an archive use: saf.sf c files..."
echo "To extract an archive use: saf.sf x"
fi
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.
-
- Posts: 7
- Joined: Tue Feb 11, 2020 6:18 am
- Team: Privateer
Re: Anyone Know A .saf Creator For Mac
This is probably obvious but where and how would I use this script?jlv wrote:Here's a bash script I use on Linux. I'm pretty sure people have used this on Macs before.
Code: Select all
#!/bin/bash # # Simple Archive Format # #set -C if test "_$1_" = _c_ then shift for f in "$@" do if ! test -f "$f" then echo 1>&2 "error: $f is not a regular file" exit 1 fi wc -c "$f" | (read size name; echo "$size $f") done echo - cat "$@" else echo "To create an archive use: saf.sf c files..." echo "To extract an archive use: saf.sf x" fi
Re: Anyone Know A .saf Creator For Mac
Copy all lines of the code, paste it into textEdit. Save it like "saf.sh" (make sure it's the .sh extension, not .rtf or whatever the default option is. The you can run the file from the terminal.RyanWebley wrote:This is probably obvious but where and how would I use this script?jlv wrote:Here's a bash script I use on Linux. I'm pretty sure people have used this on Macs before.
Code: Select all
#!/bin/bash # # Simple Archive Format # #set -C if test "_$1_" = _c_ then shift for f in "$@" do if ! test -f "$f" then echo 1>&2 "error: $f is not a regular file" exit 1 fi wc -c "$f" | (read size name; echo "$size $f") done echo - cat "$@" else echo "To create an archive use: saf.sf c files..." echo "To extract an archive use: saf.sf x" fi
Discord: StorkeN#6883 - StorkenMXS Youtube - StorkenMXS Instagram - StorkenMXS Facebook - TMFR on Faceboook
-
- Posts: 7
- Joined: Tue Feb 11, 2020 6:18 am
- Team: Privateer
Re: Anyone Know A .saf Creator For Mac
lol still not getting it, would be good if you could make one of those tutorials you seem to be so good atWahlamt wrote:Copy all lines of the code, paste it into textEdit. Save it like "saf.sh" (make sure it's the .sh extension, not .rtf or whatever the default option is. The you can run the file from the terminal.RyanWebley wrote:This is probably obvious but where and how would I use this script?jlv wrote:Here's a bash script I use on Linux. I'm pretty sure people have used this on Macs before.
Code: Select all
#!/bin/bash # # Simple Archive Format # #set -C if test "_$1_" = _c_ then shift for f in "$@" do if ! test -f "$f" then echo 1>&2 "error: $f is not a regular file" exit 1 fi wc -c "$f" | (read size name; echo "$size $f") done echo - cat "$@" else echo "To create an archive use: saf.sf c files..." echo "To extract an archive use: saf.sf x" fi
Re: Anyone Know A .saf Creator For Mac
Maybe some day soonRyanWebley wrote:lol still not getting it, would be good if you could make one of those tutorials you seem to be so good atWahlamt wrote:Copy all lines of the code, paste it into textEdit. Save it like "saf.sh" (make sure it's the .sh extension, not .rtf or whatever the default option is. The you can run the file from the terminal.RyanWebley wrote: This is probably obvious but where and how would I use this script?
Discord: StorkeN#6883 - StorkenMXS Youtube - StorkenMXS Instagram - StorkenMXS Facebook - TMFR on Faceboook
Re: Anyone Know A .saf Creator For Mac
On Linux you'd do this:RyanWebley wrote:This is probably obvious but where and how would I use this script?jlv wrote:Here's a bash script I use on Linux. I'm pretty sure people have used this on Macs before.
Code: Select all
#!/bin/bash # # Simple Archive Format # #set -C if test "_$1_" = _c_ then shift for f in "$@" do if ! test -f "$f" then echo 1>&2 "error: $f is not a regular file" exit 1 fi wc -c "$f" | (read size name; echo "$size $f") done echo - cat "$@" else echo "To create an archive use: saf.sf c files..." echo "To extract an archive use: saf.sf x" fi
1. Open a terminal.
2. Type "cat >saf.sh" and press enter.
3. Paste the script contents and press ctrl-d. (You should see the shell prompt again when you press ctrl-d.)
4. Type "chmod +x saf.sh" and press enter.
Now you should be able to run the script like this: "~/saf.sh c test.png >test.saf"
You're generally going to want to cd to the correct directory first, e.g. "cd ~/.wine/drive_c/users/ryan/Local\ Settings/Application\ Data/MX\ Simulator/", then "~/saf.sh c mytrack/* >mytrack.saf".
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.