Skip to content

Commit

Permalink
adding helper script which installs a file, w/o export markers
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander authored and Expander committed Apr 17, 2014
1 parent 5b6b41a commit c56a258
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions config/install_stripped.sh
@@ -0,0 +1,32 @@
#!/bin/sh

# This script installs a file [$1] to destiation [$2]. Optional
# install arguments can be given in [$3].

if test $# -lt 2; then
echo "Usage: ./install_stripped source destination [install args]"
exit 1
fi

# directory of this script
BASEDIR=$(dirname $0)

source="$1"
shift
dest="$1"
shift
args="$*"

if test ! -e "${source}"; then
echo "Error: source does not exist: ${source}"
exit 1
fi

stripped_source="${source}.stripped"

# strip source file
${BASEDIR}/remove_export_markers.sh ${source} > ${stripped_source}

install ${args} ${stripped_source} ${dest}

rm -f ${stripped_source}

0 comments on commit c56a258

Please sign in to comment.