/code-runner

Simple implementation in bash for compiling some supported code files and executing them for you.

Primary LanguageShellBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Contributors Forks Stargazers Issues MIT License LinkedIn

code-runner

run supported lang files with single command
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. Change.log
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This is a script written in bash, which compiles the code file and run it for you and delete other junk files if created during the process of compilation, all this with one command.

(back to top)

Built With

This project is made with following langs/frameworks.

  • BASH

(back to top)

Getting Started

Installation

Now since we are done with the setting up of environment suitable for the project to compile/run, let's install and configure the project on your system locally now.

  1. Clone the repo
    git clone https://github.com/proffapt/code-runner.git
  2. Make the script executable
    cd ./code-runner
    chmod +x ./crunner
  3. Add the alias to you shell config file
    echo "alias run="path/to/crunner"" >> ~/.SHELL_CONFIG
    source ~/.SHELL_CONFIG
  4. Run the code
    run my_code.c
    OR
    run ~/path/to/my_code.c

(back to top)

Usage

run file >>> compiles and executes the executable
run --cc=<compiler> file >>> compiles the *.c file with specified compiler
run -c=<compiler> file >>> compiles the *.c file with specified compiler
run--cxx=<compiler> file >>> compiles the *.cpp file with specified compiler
run --debug file >>> compiles the file and pipes it to the specified debugger
run d file >>> compiles the file and pipes it to the specified debugger
run rclean-exe >>> deletes all executable files within the folder recursively
run clean-exe >>> deletes all executable files within the folder NON recursively
run clean >>> removes debug folder, .out and temp files

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Changelog

v1.1.1

Added or Changed

  • Added this changelog :)
  • Added support for C and C++ files.
  • New help menu
  • New debugger support
  • New code flow
  • New clean modes

License

Distributed under the BSD-2-Clause License. See LICENSE.txt for more information.

(back to top)

Contact

Arpit Bhardwaj - Twitter - Telegram - proffapt@protonmail.com

Company website: Cybernity - CybernityForum

Project Link: https://github.com/proffapt/code-runner

(back to top)

Acknowledgments

(back to top)