Skip to content

Commit

Permalink
fix build script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <michaelsv@jfrog.com>
  • Loading branch information
sverdlov93 committed Sep 21, 2023
1 parent e0f725a commit 58dbe50
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
11 changes: 5 additions & 6 deletions build/deb_rpm/v2-jf/build-scripts/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ errorExit() {
}

checkDockerAccess() {
log "Checking docker" "DEBUG"
docker -v > /dev/null 2>&1 && docker ps > /dev/null 2>&1
if [ $? -ne 0 ]; then
errorExit "Must run as user that can execute docker commands"
fi
log "Docker is available" "DEBUG"
if docker -v > /dev/null 2>&1 && docker ps > /dev/null 2>&1; then
log "Docker is available" "DEBUG"
else
errorExit "Must run as a user that can execute docker commands"
fi
}

exitWithUsage(){
Expand Down
11 changes: 5 additions & 6 deletions build/deb_rpm/v2/build-scripts/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ errorExit() {
}

checkDockerAccess() {
log "Checking docker" "DEBUG"
docker -v > /dev/null 2>&1 && docker ps > /dev/null 2>&1
if [ $? -ne 0 ]; then
errorExit "Must run as user that can execute docker commands"
fi
log "Docker is available" "DEBUG"
if docker -v > /dev/null 2>&1 && docker ps > /dev/null 2>&1; then
log "Docker is available" "DEBUG"
else
errorExit "Must run as a user that can execute docker commands"
fi
}

exitWithUsage(){
Expand Down
4 changes: 1 addition & 3 deletions build/installcli/jf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ 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"
if [ "$?" -eq "0" ]
then
if mv $FILE_NAME "$1" ; then
echo ""
echo "The $FILE_NAME executable was installed in $1"
jf intro
Expand Down
4 changes: 1 addition & 3 deletions build/installcli/jfrog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ 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"
if [ "$?" -eq "0" ]
then
if mv $FILE_NAME "$1" ; then
echo ""
echo "The $FILE_NAME executable was installed in $1"
exit 0
Expand Down
4 changes: 1 addition & 3 deletions build/setupcli/jf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ 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"
if [ "$?" -eq "0" ]
then
if mv $FILE_NAME "$1" ; then
echo ""
echo "The $FILE_NAME executable was installed in $1"
print_installation_greeting
Expand Down

0 comments on commit 58dbe50

Please sign in to comment.