Files
Cody Boone Ferguson 9dd3054f0d Fixes in 2014/endoh1/Rakefile
Rather than have the rake.sh script remove prog.dSYM the Rakefile no
longer uses -g.

Also to silent the misleading-indentation warning the Rakefile has had
the -Wno-misleading-indentation option added to it too.
2024-05-01 10:17:10 -07:00

45 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
if ! type -P rake >/dev/null 2>&1; then
echo "'rake' cannot be found." 1>&2
echo "'rake' must be installed to run make rake or $0." 1>&2
echo "" 1>&2
if ! type -P gem >/dev/null 2>&1; then
echo "" 1>&2
echo "'gem' cannot be found." 1>&2
echo "To install 'rake' you will need the 'gem' tool." 1>&2
echo "Please see the following GitHub repo for rubygems:" 1>&2
echo "" 1>&2
echo " https://github.com/rubygems/rubygems" 1>&2
echo "" 1>&2
echo "and then run:" 1>&2
echo "" 1>&2
echo " cd rubygems && exe/gem install rake" 1>&2
echo "" 1>&2
echo "and then try running make rake or running $0 again." 1>&2
else
echo "Please run the following command as root or via sudo:" 1>&2
echo ""
echo " gem install rake" 1>&2
echo "" 1>&2
echo "and then try running make rake or running $0 again" 1>&2
fi
exit 1
elif ! rake 2>&1; then
echo "" 1>&2
echo "It appears that using rake failed. Please try running the following" 1>&2
echo "command as root or via sudo: " 1>&2
echo "" 1>&2
echo " gem install ruby-minisat" 1>&2;
echo "" 1>&2
echo "and then try running make rake or $0 again" 1>&2
exit 1
elif [[ ! -x prog ]]; then
echo "" 1>&2
echo "could not compile prog" 1>&2
exit 1
else
./prog 1>&2
exit "$?"
fi