34 lines
918 B
Bash
Executable File
34 lines
918 B
Bash
Executable File
#!/bin/bash
|
|
##makedesc: Install postman (latest)
|
|
source `dirname $0`/../helpers || exit 255
|
|
|
|
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
|
|
|
|
# set -ex
|
|
|
|
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" && \
|
|
unpack_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
|
|
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
|
|
EOF
|
|
|
|
[ $? = 0 ] && {
|
|
echo
|
|
success "Postman installed!"
|
|
echo
|
|
}
|