Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

'run'

Screw "make", I just want a script runner

Sometimes when working on projects, I need cross-platform operation. I don't want to install something like just or make. I just want to write some scripts, drop them in, and run them. That's it.

This is the solution:

  • Rust program? Drop it in .run/src/bin/myscript.rs
  • C#? Drop it in .run/src/bin/myscript.cs
  • Python? Drop it in .run/src/bin/myscript.py
  • Shell? PowerShell? Same!

Any script can be dropped in. After that, just run .\run.ps1 script-name or ./run.sh script-name.

Install

For Linux:

curl -fsSL https://catilgrass.github.io/run/install.sh | bash
chmod +x run.sh

For Windows:

iwr -useb https://catilgrass.github.io/run/install.ps1 | iex

Or manually install

For Linux:

cd your-project
git clone https://github.com/catilgrass/run
mv run/.run run/run.ps1 run/run.sh ./
rm -rf run

For Windows:

cd your-project
git clone https://github.com/catilgrass/run

Move-Item -Path "run/.run" -Destination "./.run" -Force
Move-Item -Path "run/run.ps1" -Destination "./run.ps1" -Force
Move-Item -Path "run/run.sh" -Destination "./run.sh" -Force

Remove-Item -Path "run" -Recurse -Force

Usage

./run.sh                 # Show all scripts
./run.sh python-script   # Run any script
./run.sh 3               # Run by number
./run.sh 3 Hello World   # Run with arguments

License

WTFPL — drop it into your project and use it.