sh 在Ubuntu上安装Postman

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在Ubuntu上安装Postman相关的知识,希望对你有一定的参考价值。

#!/bin/bash
cd /tmp || exit
echo "Downloading Postman ..."
wget -q https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz
tar -xzf postman.tar.gz
rm postman.tar.gz

echo "Installing to opt..."
if [ -d "/opt/Postman" ];then
    sudo rm -rf /opt/Postman
fi
sudo mv Postman /opt/Postman

echo "Creating symbolic link..."
if [ -L "/usr/bin/postman" ];then
    sudo rm -f /usr/bin/postman
fi
sudo ln -s /opt/Postman/Postman /usr/bin/postman

echo "Creating desktop link..."
if [ -L "~/.local/share/applications/postman.desktop" ];then
    sudo rm -f ~/.local/share/applications/postman.desktop
fi

cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
EOL

echo "Installation completed successfully."
echo "You can use Postman!"

以上是关于sh 在Ubuntu上安装Postman的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu18.04安装 postman 以及 添加postman快捷方式

sh 在Ubuntu上安装工具

sh 在Ubuntu上安装pyenv

sh 在ubuntu上安装docker

sh Geth在Ubuntu上安装

sh 在Ubuntu上安装Gradle