Skip to content

Commit

Permalink
fix build script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Sep 21, 2023
1 parent d67d3cc commit e0f725a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build/deb_rpm/v2-jf/build-scripts/rpm-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rpmInitSigning(){

log "Initializing rpm sign..."

gpg --allow-secret-key-import --import ${gpgKeyFile} && \
gpg --allow-secret-key-import --import "${gpgKeyFile}" && \
gpg --export -a "${keyID}" > /tmp/tmpFile && \
rpm --import /tmp/tmpFile && \
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' | grep "${keyID}" || \
Expand Down
2 changes: 1 addition & 1 deletion build/deb_rpm/v2/build-scripts/rpm-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rpmInitSigning(){

log "Initializing rpm sign..."

gpg --allow-secret-key-import --import ${gpgKeyFile} && \
gpg --allow-secret-key-import --import "${gpgKeyFile}" && \
gpg --export -a "${keyID}" > /tmp/tmpFile && \
rpm --import /tmp/tmpFile && \
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n' | grep "${keyID}" || \
Expand Down
7 changes: 3 additions & 4 deletions build/installcli/jf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
CLI_OS="na"
CLI_MAJOR_VER="v2-jf"
VERSION="[RELEASE]"
# Order is by destination priority.
DESTINATION_PATHS="/usr/local/bin /usr/bin /opt/bin"

if [ $# -eq 1 ]
then
Expand Down Expand Up @@ -65,11 +63,12 @@ curl -XGET "$URL" -L -k -g > $FILE_NAME
chmod u+x $FILE_NAME

# Move executable to a destination in path.
set -- $DESTINATION_PATHS
# Order is by destination priority.
set -- "/usr/local/bin" "/usr/bin" "/opt/bin"
while [ -n "$1" ]; do
# Check if destination is in path.
if echo "$PATH"|grep "$1" -> /dev/null ; then
mv $FILE_NAME $1
mv $FILE_NAME "$1"
if [ "$?" -eq "0" ]
then
echo ""
Expand Down
7 changes: 3 additions & 4 deletions build/installcli/jfrog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
CLI_OS="na"
CLI_MAJOR_VER="v2"
VERSION="[RELEASE]"
# Order is by destination priority.
DESTINATION_PATHS="/usr/local/bin /usr/bin /opt/bin"

if [ $# -eq 1 ]
then
Expand Down Expand Up @@ -65,11 +63,12 @@ curl -XGET "$URL" -L -k -g > $FILE_NAME
chmod u+x $FILE_NAME

# Move executable to a destination in path.
set -- $DESTINATION_PATHS
# Order is by destination priority.
set -- "/usr/local/bin" "/usr/bin" "/opt/bin"
while [ -n "$1" ]; do
# Check if destination is in path.
if echo "$PATH"|grep "$1" -> /dev/null ; then
mv $FILE_NAME $1
mv $FILE_NAME "$1"
if [ "$?" -eq "0" ]
then
echo ""
Expand Down
7 changes: 3 additions & 4 deletions build/setupcli/jf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
CLI_OS="na"
CLI_MAJOR_VER="v2-jf"
VERSION="[RELEASE]"
# Order is by destination priority.
DESTINATION_PATHS="/usr/local/bin /usr/bin /opt/bin"
SETUP_COMMAND="jf setup"
GREEN_COLOR='\033[0;32m'
REMOVE_COLOR='\033[0m'
Expand Down Expand Up @@ -69,11 +67,12 @@ curl -XGET "$URL" -L -k -g > $FILE_NAME
chmod u+x $FILE_NAME

# Move executable to a destination in path.
set -- $DESTINATION_PATHS
# Order is by destination priority.
set -- "/usr/local/bin" "/usr/bin" "/opt/bin"
while [ -n "$1" ]; do
# Check if destination is in path.
if echo "$PATH"|grep "$1" -> /dev/null ; then
mv $FILE_NAME $1
mv $FILE_NAME "$1"
if [ "$?" -eq "0" ]
then
echo ""
Expand Down

0 comments on commit e0f725a

Please sign in to comment.