Joseph Lenox 2bedc5c9df Link to libstdc++ statically. (#4016)
* Link to libstdc++ statically.

* use a linker flag instead.

* Update Build.PL

* Link to static paths on Travis only.

* Fix SFTP to abort of SFTP errors.

* Create sftp.sh

* always set -static-libstdc++ now in ldflags

also removed gcc 4.6 workaround

* remove buggy gcc check for 4.7, it is no longer supported

* Remove -lstdc++

Static linking is done on Travis for linux.

* Filter -lstdc++ on linux, static c++
2017-06-09 08:05:21 -05:00

35 lines
774 B
Bash
Executable File

#!/bin/bash
# Prerequisites
# Environment Variables:
# UPLOAD_USER - user to upload to sftp server
# KEY is assumed to be path to a ssh key for UPLOAD_USER
DIR=$1
shift
KEY=$1
shift
FILES=$*
source $(dirname $0)/../common/util.sh
set_pr_id
set_branch
if [ ! -z ${PR_ID+x} ] || [ $current_branch != "master" ]; then
DIR=${DIR}/branches
fi
if [ -s $KEY ]; then
for i in $FILES; do
filepath=$(readlink -f "$i")
tmpfile=$(mktemp)
echo put $filepath > $tmpfile
sftp -b $tmpfile -i$KEY "${UPLOAD_USER}@dl.slic3r.org:$DIR/"
result=$?
if [ $? -eq 1 ]; then
echo "Error with SFTP"
exit $result;
fi
done
else
echo "$KEY is not available, not deploying."
fi
exit $result