Skip to content

Commit 4a7ed0f

Browse files
committed
Merge branch 'develop' into master
2 parents e7eadd8 + ee4aff9 commit 4a7ed0f

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The copy feature must be enabled on both client and server configuration file:
136136
{
137137
"ssf": {
138138
"services": {
139-
"file_copy": { "enable": true }
139+
"copy": { "enable": true }
140140
}
141141
}
142142
}
@@ -276,7 +276,7 @@ ssfcp [-c config_file] [-p port] -r remote_host@path/to/dir absolute/path/direct
276276
"enable": true,
277277
"gateway_ports": false
278278
},
279-
"file_copy": { "enable": false },
279+
"copy": { "enable": false },
280280
"shell": {
281281
"enable": false,
282282
"path": "/bin/bash|C:\\windows\\system32\\cmd.exe",

Diff for: tools/generate_unix_release.sh

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
#
3+
# This script generates a Unix release
4+
# Includes:
5+
# - SSF binaries
6+
# - UPXed SSF binaries
7+
# - tests certs (for test purpose only)
8+
9+
set -e
10+
11+
echo "Usage: ./generate_unix_release.sh SSF_VERSION CMAKE_GENERATOR ABS_SSF_SOURCE_DIR BOOST_PATH OPENSSL_PATH BUILD_TYPE BUILD_DIR"
12+
13+
if [ -z "$1" ]; then "Missing VERSION"; exit 1; else VERSION="$1"; fi
14+
if [ -z "$2" ]; then "Missing CMAKE_GENERATOR"; exit 1; else CMAKE_GENERATOR="$2"; fi
15+
if [ -z "$3" ]; then "Missing ABS_SSF_SOURCE_DIR"; exit 1; else ABS_SSF_SOURCE_DIR="$3"; fi
16+
if [ -z "$4" ]; then "Missing BOOST_PATH"; exit 1; else BOOST_PATH="$4"; fi
17+
if [ -z "$5" ]; then "Missing OPENSSL_PATH"; exit 1; else OPENSSL_PATH="$5"; fi
18+
if [ -z "$6" ]; then "Missing BUILD_TYPE"; exit 1; else BUILD_TYPE="$6"; fi
19+
if [ -z "$7" ]; then "Missing BUILD_DIR"; exit 1; else BUILD_DIR="$7"; fi
20+
21+
TARGET="ssf-${VERSION}"
22+
INSTALL_BIN_PATH="${BUILD_DIR}/ssf/${TARGET}"
23+
24+
echo "* VERSION: '${VERSION}'"
25+
echo "* CMAKE_GENERATOR: '${CMAKE_GENERATOR}'"
26+
echo "* ABS_SSF_SOURCE_DIR: '${ABS_SSF_SOURCE_DIR}'"
27+
echo "* OUTPUT_FILEPATH: '${OUTPUT_FILEPATH}'"
28+
echo "* BOOST_PATH: '${BOOST_PATH}'"
29+
echo "* OPENSSL_PATH: '${OPENSSL_PATH}'"
30+
echo "* BUILD_TYPE: '${BUILD_TYPE}'"
31+
32+
echo "* Create build directory '${BUILD_DIR}'..."
33+
mkdir -p ${BUILD_DIR}
34+
35+
cd ${BUILD_DIR}
36+
echo "* CMake pre processing..."
37+
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}
38+
39+
echo "* Build binaries..."
40+
cmake --build . --target install --config $BUILD_TYPE -- -j2
41+
42+
mv ${INSTALL_BIN_PATH}/bin/* ${INSTALL_BIN_PATH}
43+
rmdir ${INSTALL_BIN_PATH}/bin
44+
45+
echo "* UPX binaries..."
46+
for BIN_PATH in ${INSTALL_BIN_PATH}/ssf*;
47+
do
48+
BIN_NAME=`basename ${BIN_PATH}`
49+
upx --best -o "${INSTALL_BIN_PATH}/upx-${BIN_NAME}" ${BIN_PATH}
50+
done
51+
52+
cd -
53+
54+
echo "* Release directory: '${INSTALL_BIN_PATH}'"

0 commit comments

Comments
 (0)