2021-12-22 13:51:22 +00:00
|
|
|
#!/bin/bash
|
2022-07-04 09:56:45 +00:00
|
|
|
##makedesc: Install postman (latest)
|
2024-07-31 15:36:02 +00:00
|
|
|
source `dirname $0`/../helpers || exit 255
|
2022-07-04 09:56:45 +00:00
|
|
|
|
2024-07-31 15:36:02 +00:00
|
|
|
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
|
2021-12-22 13:51:22 +00:00
|
|
|
|
2024-07-31 15:36:02 +00:00
|
|
|
# set -ex
|
2021-12-22 13:51:22 +00:00
|
|
|
|
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" && \
|
2024-11-24 13:13:37 +00:00
|
|
|
unpack_targz "$HOME/install/postman.tar.gz" "$HOME/install" && \
|
2024-07-31 15:36:02 +00:00
|
|
|
symlink "$HOME/install/Postman/Postman" "$HOME/.local/bin/postman" && \
|
|
|
|
cat << EOF > "$HOME/.local/share/applications/Postman.desktop" && sudo update-desktop-database
|
2021-12-22 13:51:22 +00:00
|
|
|
[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
|
2021-12-22 13:51:22 +00:00
|
|
|
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
|
|
|
|
}
|