codecrafters-shell-c

personal solution to the "Build Your Own Shell" challenge from codecrafters
git clone https://github.com/5hif7y/codecrafters-shell-c.git
Log | Files | Refs | README

your_program.sh (737B)


      1 #!/bin/sh
      2 #
      3 # Use this script to run your program LOCALLY.
      4 #
      5 # Note: Changing this script WILL NOT affect how CodeCrafters runs your program.
      6 #
      7 # Learn more: https://codecrafters.io/program-interface
      8 
      9 set -e # Exit early if any commands fail
     10 
     11 # Copied from .codecrafters/compile.sh
     12 #
     13 # - Edit this to change how your program compiles locally
     14 # - Edit .codecrafters/compile.sh to change how your program compiles remotely
     15 (
     16   cd "$(dirname "$0")" # Ensure compile steps are run within the repository directory
     17   gcc app/*.c -o /tmp/shell-target
     18 )
     19 
     20 # Copied from .codecrafters/run.sh
     21 #
     22 # - Edit this to change how your program runs locally
     23 # - Edit .codecrafters/run.sh to change how your program runs remotely
     24 exec /tmp/shell-target "$@"