Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit baae081

Browse files
committed
fixes for dkpg/deb packaging
Fixes #997
1 parent ba4b826 commit baae081

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

dist/bin/fsh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Copyright 2017 IBM Corporation
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
# directory of script
20+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
21+
22+
# are we using a symlink?
23+
LINK=`readlink "$DIR/fsh"`
24+
if [ $? == 0 ]; then
25+
# yes we are, then update DIR...
26+
REL=`dirname "$LINK"`
27+
DIR="${DIR}/${REL}"
28+
fi
29+
30+
BIN="$DIR/../fsh/IBM Cloud Shell"
31+
32+
"$BIN" --fsh-headless "$@"

dist/build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,15 @@ function linux {
147147
--overwrite
148148

149149
# CLI script
150-
cp ../app/bin/fsh "$BUILDDIR/${PRODUCT_NAME}-linux-x64"
150+
cp ./bin/fsh "$BUILDDIR/${PRODUCT_NAME}-linux-x64"
151151

152152
if [ -z "$NO_INSTALLER" ]; then
153153
(cd $BUILDDIR && zip -q -r "${PRODUCT_NAME}-linux-x64" "${PRODUCT_NAME}-linux-x64" -x \*~)
154-
./node_modules/.bin/electron-installer-debian --src "${BUILDDIR}/${PRODUCT_NAME}-linux-x64" --dest ${BUILDDIR}/installers/ --arch amd64 --config dpkg-config.json
154+
rm -f "${BUILDDIR}/installers/*.deb"
155+
DEBUG=electron-installer-debian ./node_modules/.bin/electron-installer-debian --src "${BUILDDIR}/${PRODUCT_NAME}-linux-x64" --dest ${BUILDDIR}/installers/ --arch amd64 --config dpkg-config.json
156+
for deb in "${BUILDDIR}/installers/*.deb"; do
157+
mv -f $deb "${BUILDDIR}/${PRODUCT_NAME}-linux-x64.deb"
158+
done
155159
fi
156160
fi
157161
}

dist/dpkg-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"name": "fsh"
2+
"name": "fsh",
3+
"bin": "fsh"
34
}

0 commit comments

Comments
 (0)