Giter Club home page Giter Club logo

as3shebang's Introduction

as3shebang – The ActionScript 3.0 Interpreter

as3shebang is an executable program based on the RedTamarin runtime.

It allows you to run uncompiled ActionScript 3.0 source code as an executable shell script.

The executable is totally independent of any other installed runtimes, and so can be installed with Redtamarin runtimes in parallel or without them.

Install

Download the package for your operating system

  • Windows
    as3shebang_1.0.0_win32.deb for 32-bit systems
    as3shebang_1.0.0_win64.deb for 64-bit systems
  • Mac OS X
    as3shebang_1.0.0_darwin-i386.deb for 32-bit systems
    as3shebang_1.0.0_darwin-amd64.deb for 64-bit systems
  • Linux
    as3shebang_1.0.0_i386.deb for 32-bit systems
    as3shebang_1.0.0_amd64.deb for 64-bit systems

Windows Install

You will need a POSIX environment setup
and may have to install redtamarin-setup.bat first
see Redtamarin Windows Environment Setup

install
$ wpkg -i as3shebang_1.0.0_win64.deb

Mac OS X Install

You need the command-line tool dpkg installed
either use MacPorts $ port install dpkg or Brew $ brew install dpkg

install
$ sudo dpkg -i as3shebang_1.0.0_darwin-amd64.deb

If you receive some errors because of gnutar not found, you can force the install with
$ sudo dpkg --force-all -i as3shebang_1.0.0_darwin-amd64.deb

Linux Install

$ sudo dpkg -i as3shebang_1.0.0_amd64.deb

Example

Create a script
$ touch test

Make it executable
$ chmod +x test

Edit the script
$ nano test

Starts the script with the shebang line

#!/usr/bin/as3shebang

// Use AS3 to write some shell scripts :)
import shell.Program;
import shell.Runtime;

trace( "hello world" );

trace( "    Program.type = " + Program.type );
trace( "Program.filename = " + Program.filename );
trace( "startupDirectory = " + Program.startupDirectory );
trace( "    Program args = " + Program.argv );
trace( "" );
trace( "Redtamarin v" + Runtime.version + " " + (Runtime.is64bit() ? "64-bit": "32-bit" ) );

Run the script
$ ./test
$ ./test a b c

as3shebang's People

Contributors

zwetan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.