shell/install/postman

34 lines
917 B
Plaintext
Raw Normal View History

#!/bin/bash
##makedesc: Install postman (latest)
2024-07-31 15:36:02 +00:00
source `dirname $0`/../helpers || exit 255
2024-07-31 15:36:02 +00:00
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
2024-07-31 15:36:02 +00:00
# set -ex
2024-07-31 15:36:02 +00:00
title
mkdir -p "$HOME/install" && \
"$HOME/.local/bin" && \
"$HOME/.local/share/applications"
download "https://dl.pstmn.io/download/latest/linux64" "$HOME/install/postman.tar.gz" && \
unpak_targz "$HOME/install/postman.tar.gz" "$HOME/install" && \
symlink "$HOME/install/Postman/Postman" "$HOME/.local/bin/postman" && \
cat << EOF > "$HOME/.local/share/applications/Postman.desktop" && sudo update-desktop-database
[Desktop Entry]
Name=Postman
2024-07-31 15:36:02 +00:00
Exec=$HOME/.local/bin/postman %U
Icon=$HOME/install/Postman/app/icons/icon_128x128.png
Categories=Development,Network
Terminal=false
Type=Application
Encoding=UTF-8
2022-07-05 02:51:43 +00:00
EOF
2024-07-31 15:36:02 +00:00
[ $? = 0 ] && {
echo
success "Postman installed!"
echo
}