Revision f5e5ea53d9d0db8e154197cfc8f551a1f445e532 authored by kshyatt on 29 March 2017, 21:33:19 UTC, committed by kshyatt on 01 April 2017, 19:00:10 UTC
1 parent 4fe28fb
install.sh
#!/bin/sh
# This file is a part of Julia. License is MIT: http://julialang.org/license
# Usage: very similar to `install`
# install.sh 755 src1 src2 ... dest
PERMS=$1
shift
ARGS=""
while [ $# -gt 1 ]; do
ARGS="$ARGS $1"
shift
done
DEST=$1
for SRC in $ARGS; do
cp -a $SRC $DEST
if [ -d "$DEST" ]; then
DESTFILE="$DEST/$(basename "$SRC")"
else
DESTFILE="$DEST"
fi
# Do the chmod dance, and ignore errors on platforms that don't like setting permissions of symlinks
# TODO: Test if it's a symlink instead of having to redirect stderr to /dev/null
chmod $PERMS $DESTFILE 2>/dev/null
done
exit 0
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...