Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
olachere committed Nov 17, 2017
2 parents e7eadd8 + ee4aff9 commit 4a7ed0f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The copy feature must be enabled on both client and server configuration file:
{
"ssf": {
"services": {
"file_copy": { "enable": true }
"copy": { "enable": true }
}
}
}
Expand Down Expand Up @@ -276,7 +276,7 @@ ssfcp [-c config_file] [-p port] -r remote_host@path/to/dir absolute/path/direct
"enable": true,
"gateway_ports": false
},
"file_copy": { "enable": false },
"copy": { "enable": false },
"shell": {
"enable": false,
"path": "/bin/bash|C:\\windows\\system32\\cmd.exe",
Expand Down
54 changes: 54 additions & 0 deletions tools/generate_unix_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
#
# This script generates a Unix release
# Includes:
# - SSF binaries
# - UPXed SSF binaries
# - tests certs (for test purpose only)

set -e

echo "Usage: ./generate_unix_release.sh SSF_VERSION CMAKE_GENERATOR ABS_SSF_SOURCE_DIR BOOST_PATH OPENSSL_PATH BUILD_TYPE BUILD_DIR"

if [ -z "$1" ]; then "Missing VERSION"; exit 1; else VERSION="$1"; fi
if [ -z "$2" ]; then "Missing CMAKE_GENERATOR"; exit 1; else CMAKE_GENERATOR="$2"; fi
if [ -z "$3" ]; then "Missing ABS_SSF_SOURCE_DIR"; exit 1; else ABS_SSF_SOURCE_DIR="$3"; fi
if [ -z "$4" ]; then "Missing BOOST_PATH"; exit 1; else BOOST_PATH="$4"; fi
if [ -z "$5" ]; then "Missing OPENSSL_PATH"; exit 1; else OPENSSL_PATH="$5"; fi
if [ -z "$6" ]; then "Missing BUILD_TYPE"; exit 1; else BUILD_TYPE="$6"; fi
if [ -z "$7" ]; then "Missing BUILD_DIR"; exit 1; else BUILD_DIR="$7"; fi

TARGET="ssf-${VERSION}"
INSTALL_BIN_PATH="${BUILD_DIR}/ssf/${TARGET}"

echo "* VERSION: '${VERSION}'"
echo "* CMAKE_GENERATOR: '${CMAKE_GENERATOR}'"
echo "* ABS_SSF_SOURCE_DIR: '${ABS_SSF_SOURCE_DIR}'"
echo "* OUTPUT_FILEPATH: '${OUTPUT_FILEPATH}'"
echo "* BOOST_PATH: '${BOOST_PATH}'"
echo "* OPENSSL_PATH: '${OPENSSL_PATH}'"
echo "* BUILD_TYPE: '${BUILD_TYPE}'"

echo "* Create build directory '${BUILD_DIR}'..."
mkdir -p ${BUILD_DIR}

cd ${BUILD_DIR}
echo "* CMake pre processing..."
cmake ${ABS_SSF_SOURCE_DIR} -G "${CMAKE_GENERATOR}" -DUSE_STATIC_LIBS=ON -DBOOST_ROOT=$BOOST_PATH -DOPENSSL_ROOT_DIR=$OPENSSL_PATH -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=${INSTALL_BIN_PATH}

echo "* Build binaries..."
cmake --build . --target install --config $BUILD_TYPE -- -j2

mv ${INSTALL_BIN_PATH}/bin/* ${INSTALL_BIN_PATH}
rmdir ${INSTALL_BIN_PATH}/bin

echo "* UPX binaries..."
for BIN_PATH in ${INSTALL_BIN_PATH}/ssf*;
do
BIN_NAME=`basename ${BIN_PATH}`
upx --best -o "${INSTALL_BIN_PATH}/upx-${BIN_NAME}" ${BIN_PATH}
done

cd -

echo "* Release directory: '${INSTALL_BIN_PATH}'"

0 comments on commit 4a7ed0f

Please sign in to comment.