Skip to content

Commit

Permalink
Update package_web.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Karmhack authored Jun 7, 2024
1 parent 9a0c3c5 commit 1dff4f2
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions sources/install/package_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -930,32 +930,21 @@ function package_web() {

function install_postman() {
# CODE-CHECK-WHITELIST=add-aliases
if [[ $(uname -m) = 'x86_64' ]]
then
colorecho "Installing postman"
curl -L https://dl.pstmn.io/download/latest/linux_64 -o /tmp/postman.tar.gz
tar -xf /tmp/postman.tar.gz --directory /tmp
rm /tmp/postman.tar.gz
mv /tmp/Postman /opt/tools/Postman
ln -s "/opt/tools/Postman/app/Postman" "/opt/tools/bin/postman"
fapt libsecret-1-0 -y
add-history postman
add-test-command "which postman"
add-to-list "postman,https://www.postman.com/,API platform for testing APIs"

elif [[ $(uname -m) = 'aarch64' ]]
then
curl -L https://dl.pstmn.io/download/latest/linux_arm64 -o /tmp/postman.tar.gz
tar -xf /tmp/postman.tar.gz --directory /tmp
rm /tmp/postman.tar.gz
mv /tmp/Postman /opt/tools/Postman
ln -s "/opt/tools/Postman/app/Postman" "/opt/tools/bin/postman"
fapt libsecret-1-0 -y
add-history postman
add-test-command "which postman"
add-to-list "postman,https://www.postman.com/,API platform for testing APIs"

else
criticalecho-noexit "This installation function doesn't support architecture $(uname -m)" && return
colorecho "Installing Postman"
local archive_name
if [[ $(uname -m) = 'x86_64' ]]; then
archive_name="linux_64"
elif [[ $(uname -m) = 'aarch64' ]]; then
archive_name="linux_arm64"
fi
curl -L "https://dl.pstmn.io/download/latest/${archive_name}" -o /tmp/postman.tar.gz
tar -xf /tmp/postman.tar.gz --directory /tmp
rm /tmp/postman.tar.gz
mv /tmp/Postman /tmp/postman
mv /tmp/postman /opt/tools/postman
ln -s /opt/tools/postman/app/Postman /opt/tools/bin/postman
fapt libsecret-1-0
add-history postman
add-test-command "which postman"
add-to-list "postman,https://www.postman.com/,API platform for testing APIs"
}

0 comments on commit 1dff4f2

Please sign in to comment.