Skip to content

Instantly share code, notes, and snippets.

@siburu
Created October 10, 2014 13:39
Show Gist options
  • Save siburu/bda08845ea1cf9c3efce to your computer and use it in GitHub Desktop.
Save siburu/bda08845ea1cf9c3efce to your computer and use it in GitHub Desktop.
Ban -j option
#!/bin/sh
args=
afterj=false
for arg in $*
do
if [ "$arg" = '-j' ]
then
afterj=true
elif [ $afterj = true ]
then
afterj=false
if [[ ! "$arg" =~ ^[0-9]+$ ]]
then
args="$args $arg"
fi
else
args="$args $arg"
fi
done
/usr/bin/make $args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment