2021-12-22 13:51:22 +00:00
|
|
|
#!/bin/bash
|
2022-07-04 09:56:45 +00:00
|
|
|
##makedesc: Install postman (latest)
|
2023-04-14 04:06:40 +00:00
|
|
|
source `dirname $0`/../helpers || exit 255
|
2022-07-04 09:56:45 +00:00
|
|
|
|
2023-04-14 04:06:40 +00:00
|
|
|
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
|
2021-12-22 13:51:22 +00:00
|
|
|
|
2023-08-31 04:46:39 +00:00
|
|
|
# set -ex
|
|
|
|
|
2023-04-14 04:06:40 +00:00
|
|
|
title
|
2021-12-22 13:51:22 +00:00
|
|
|
|
2023-04-14 04:06:40 +00:00
|
|
|
mkdir -p "$HOME/install" && \
|
|
|
|
"$HOME/.local/bin" && \
|
|
|
|
"$HOME/.local/share/applications"
|
|
|
|
|
2023-08-31 04:46:39 +00:00
|
|
|
download "https://dl.pstmn.io/download/latest/linux64" "$HOME/install/postman.tar.gz" && \
|
2023-04-14 04:06:40 +00:00
|
|
|
unpak_targz "$HOME/install/postman.tar.gz" "$HOME/install" && \
|
2023-08-31 04:46:39 +00:00
|
|
|
symlink "$HOME/install/Postman/Postman" "$HOME/.local/bin/postman" && \
|
2023-04-14 04:06:40 +00:00
|
|
|
cat << EOF > "$HOME/.local/share/applications/Postman.desktop" && sudo update-desktop-database
|
2021-12-22 13:51:22 +00:00
|
|
|
[Desktop Entry]
|
|
|
|
Name=Postman
|
2023-04-14 04:06:40 +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
|
2023-04-14 04:06:40 +00:00
|
|
|
|
|
|
|
[ $? = 0 ] && {
|
|
|
|
echo
|
|
|
|
success "Postman installed!"
|
|
|
|
echo
|
|
|
|
}
|