Created
July 10, 2012 17:35
-
-
Save dragan/3084939 to your computer and use it in GitHub Desktop.
Simple script I put together to create a script wrapper for mulder and install it in /usr/local
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
# Respect PREFIX if set, otherwise default to /usr/local | |
if [ -z "${PREFIX}" ]; then | |
PREFIX="/usr/local" | |
fi | |
BIN_PATH="${PREFIX}/bin" | |
LIB_PATH="${PREFIX}/lib/mulder" | |
# Remove old mulder | |
rm -rf "${LIB_PATH}" | |
# Copy mulder to LIB_PATH | |
echo "*** Installing Mulder..." | |
mkdir -p "$LIB_PATH" | |
cp Development/Mulder/artifacts/output/*.* "${LIB_PATH}" | |
# Remove old proxy script | |
rm -rf "${BIN_PATH}/mulder" | |
# Create new proxy script | |
echo "#!/bin/sh" >> "${BIN_PATH}/mulder" | |
echo "mono --runtime=v4.0.30319 ${LIB_PATH}/Mulder.Cli.exe \"\$@\"" >> "${BIN_PATH}/mulder" | |
chmod a+x "${BIN_PATH}/mulder" | |
# All done | |
echo "*** Installed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment