-
-
Save tonythere/b70a4a11fb24e93a26e9bf8b25cd02f0 to your computer and use it in GitHub Desktop.
Revisions
-
SanderTheDragon revised this gist
Sep 2, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -150,7 +150,7 @@ while true; do done echo "Installing" sudo apt install -y "./postman_$version.deb" if [ $? -gt 0 ]; then echo "Failed to install 'postman_$version.deb'" -
SanderTheDragon revised this gist
Sep 1, 2020 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Copy and paste this line into your terminal to run the script: ```sh curl https://gist.github.com/SanderTheDragon/1331397932abaa1d6fbbf63baed5f043/raw/postman-deb.sh | sh ``` Or this line if you don't have `curl`: ```sh wget -O - https://gist.github.com/SanderTheDragon/1331397932abaa1d6fbbf63baed5f043/raw/postman-deb.sh | sh ``` -
SanderTheDragon revised this gist
Apr 21, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -111,7 +111,7 @@ chmod 0775 "postman_$version/DEBIAN/prerm" echo "Validating modes" nc="" if [ $(stat -c "%a" "postman_$version/DEBIAN/control") != "775" ]; then echo "File modes are invalid, calling 'dpkg-deb' with '--nocheck'" nc="--nocheck" else -
SanderTheDragon revised this gist
Apr 21, 2020 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -109,13 +109,22 @@ chmod 0775 "postman_$version/DEBIAN/control" chmod 0775 "postman_$version/DEBIAN/postinst" chmod 0775 "postman_$version/DEBIAN/prerm" echo "Validating modes" nc="" if [ $(stat -c "%a" "postman_$version/DEBIAN/control") != "755" ]; then echo "File modes are invalid, calling 'dpkg-deb' with '--nocheck'" nc="--nocheck" else echo "File modes are valid" fi if [ -f "postman_$version.deb" ]; then echo "Removing old 'postman_$version.deb'" rm -f "postman_$version.deb" fi echo "Building 'postman_$version.deb'" dpkg-deb $nc -b "postman_$version" > /dev/null if [ $? -gt 0 ]; then echo "Failed to build 'postman_$version.deb'" -
SanderTheDragon revised this gist
Jan 26, 2020 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,16 +69,16 @@ if [ -d "postman_$version" ]; then fi echo "Creating 'postman_$version' folder structure and files" mkdir -m 0755 -p "postman_$version" mkdir -m 0755 -p "postman_$version/usr/share/applications" touch "postman_$version/usr/share/applications/Postman.desktop" mkdir -m 0755 -p "postman_$version/usr/share/icons/hicolor/128x128/apps" mkdir -m 0755 -p "postman_$version/opt/postman" mkdir -m 0755 -p "postman_$version/DEBIAN" touch "postman_$version/DEBIAN/control" "postman_$version/DEBIAN/postinst" "postman_$version/DEBIAN/prerm" echo "Copying files" @@ -102,6 +102,10 @@ echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi" > "postman_$version/DEBIAN/prerm" echo "Setting modes" chmod 0775 "postman_$version/usr/share/applications/Postman.desktop" chmod 0775 "postman_$version/DEBIAN/control" chmod 0775 "postman_$version/DEBIAN/postinst" chmod 0775 "postman_$version/DEBIAN/prerm" -
SanderTheDragon revised this gist
Dec 22, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -97,7 +97,7 @@ fi echo "Writing files" echo $e "[Desktop Entry]\nType=Application\nName=Postman\nGenericName=Postman API Tester\nIcon=postman\nExec=postman\nPath=/opt/postman\nCategories=Development;" > "postman_$version/opt/postman/Postman.desktop" echo $e "Package: Postman\nVersion: $version\nSection: devel\nPriority: optional\nArchitecture: amd64\nDepends: gconf2, libgtk2.0-0, desktop-file-utils\nOptional: libcanberra-gtk-module\nMaintainer: You\nDescription: Postman\n API something" > "postman_$version/DEBIAN/control" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi\n\nsudo ln -s \"/opt/postman/Postman\" \"/usr/bin/postman\"\n\ndesktop-file-install \"/opt/postman/Postman.desktop\"" > "postman_$version/DEBIAN/postinst" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi" > "postman_$version/DEBIAN/prerm" @@ -124,7 +124,7 @@ rm -rf "Postman/" rm -rf "postman_$version/" while true; do read -p "Do you want to install 'postman_$version.deb' [Y/n] " yn if [ -z $yn ]; then yn="y" -
SanderTheDragon revised this gist
Nov 13, 2019 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,9 @@ echo "Testing Postman version" targetName="" if [ -z $curlExists ]; then targetName=$(wget -S --spider "https://dl.pstmn.io/download/latest/linux64" 2>&1 | grep "Content-Disposition" | awk -F '=' '{ print $2 }') else targetName=$(curl -sI "https://dl.pstmn.io/download/latest/linux64" | grep "content-disposition" | awk -F '=' '{ print $2 }') fi versionMaj=$(echo "$targetName" | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $1 }') @@ -25,16 +25,16 @@ echo "Most recent Postman version V$version" current=$(dpkg-query --showformat='${Version}' --show postman 2> /dev/null) if [ $? -gt 0 ]; then echo "Postman is not installed" else echo "Installed version V$current" if [ "$current" = "$version" ]; then echo "The most recent version of Postman is currently installed" exit else echo "Updating Postman to the latest version" fi fi echo "Downloading latest Postman tarball" -
SanderTheDragon revised this gist
Nov 13, 2019 . 1 changed file with 31 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,9 +6,39 @@ if [ $? -eq 0 ]; then rm -f $(ls Postman*.tar.gz) fi curlExists=$(command -v curl) echo "Testing Postman version" targetName="" if [ -z $curlExists ]; then targetName=$(wget -S --spider "https://dl.pstmn.io/download/latest/linux64" 2>&1 | grep "Content-Disposition" | awk -F '=' '{ print $2 }') else targetName=$(curl -sI "https://dl.pstmn.io/download/latest/linux64" | grep "content-disposition" | awk -F '=' '{ print $2 }') fi versionMaj=$(echo "$targetName" | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $1 }') versionMin=$(echo "$targetName" | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $2 }') versionRev=$(echo "$targetName" | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $3 }') version="$versionMaj.$versionMin-$versionRev" echo "Most recent Postman version V$version" current=$(dpkg-query --showformat='${Version}' --show postman 2> /dev/null) if [ $? -gt 0 ]; then echo "Postman is not installed" else echo "Installed version V$current" if [ "$current" = "$version" ]; then echo "The most recent version of Postman is currently installed" exit else echo "Updating Postman to the latest version" fi fi echo "Downloading latest Postman tarball" if [ -z $curlExists ]; then wget -q --show-progress "https://dl.pstmn.io/download/latest/linux64" --content-disposition else @@ -33,13 +63,6 @@ if [ $? -gt 0 ]; then exit fi if [ -d "postman_$version" ]; then echo "Removing old 'postman_$version/'" rm -rf "postman_$version/" -
SanderTheDragon revised this gist
Aug 19, 2019 . 1 changed file with 15 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,11 @@ #!/bin/sh ls Postman*.tar.gz > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "Removing old Postman tarballs" rm -f $(ls Postman*.tar.gz) fi echo "Downloading latest Postman tarball" curlExists=$(command -v curl) @@ -65,6 +62,16 @@ echo "Copying files" cp "Postman/app/resources/app/assets/icon.png" "postman_$version/usr/share/icons/hicolor/128x128/apps/postman.png" cp -R "Postman/"* "postman_$version/opt/postman/" echo "Testing whether to use '-e'" lines=$(echo "\n" | wc -l) e="" if [ $lines -eq 1 ]; then echo "'-e' is required" e="-e" else echo "'-e' is not required" fi echo "Writing files" echo $e "[Desktop Entry]\nType=Application\nName=Postman\nGenericName=Postman API Tester\nIcon=postman\nExec=postman\nPath=/opt/postman\nCategories=Development;" > "postman_$version/opt/postman/Postman.desktop" echo $e "Package: Postman\nVersion: $version\nSection: devel\nPriority: optional\nArchitecture: amd64\nDepends: gconf2, libgtk2.0-0\nOptional: libcanberra-gtk-module\nMaintainer: You\nDescription: Postman\n API something" > "postman_$version/DEBIAN/control" @@ -85,7 +92,6 @@ dpkg-deb -b "postman_$version" > /dev/null if [ $? -gt 0 ]; then echo "Failed to build 'postman_$version.deb'" exit fi @@ -116,4 +122,4 @@ if [ $? -gt 0 ]; then fi echo "Removing 'postman_$version.deb'" rm -f "postman_$version.deb" -
SanderTheDragon revised this gist
Jul 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,7 +67,7 @@ cp -R "Postman/"* "postman_$version/opt/postman/" echo "Writing files" echo $e "[Desktop Entry]\nType=Application\nName=Postman\nGenericName=Postman API Tester\nIcon=postman\nExec=postman\nPath=/opt/postman\nCategories=Development;" > "postman_$version/opt/postman/Postman.desktop" echo $e "Package: Postman\nVersion: $version\nSection: devel\nPriority: optional\nArchitecture: amd64\nDepends: gconf2, libgtk2.0-0\nOptional: libcanberra-gtk-module\nMaintainer: You\nDescription: Postman\n API something" > "postman_$version/DEBIAN/control" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi\n\nsudo ln -s \"/opt/postman/Postman\" \"/usr/bin/postman\"\n\ndesktop-file-install \"/opt/postman/Postman.desktop\"" > "postman_$version/DEBIAN/postinst" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi" > "postman_$version/DEBIAN/prerm" -
SanderTheDragon revised this gist
May 28, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,7 +62,7 @@ mkdir -p "postman_$version/DEBIAN" touch "postman_$version/DEBIAN/control" "postman_$version/DEBIAN/postinst" "postman_$version/DEBIAN/prerm" echo "Copying files" cp "Postman/app/resources/app/assets/icon.png" "postman_$version/usr/share/icons/hicolor/128x128/apps/postman.png" cp -R "Postman/"* "postman_$version/opt/postman/" echo "Writing files" -
SanderTheDragon revised this gist
Mar 31, 2018 . 1 changed file with 12 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,11 @@ #!/bin/sh script=`basename "$0"` if [ $# -gt 0 ] && [ "$1" = "-e" ]; then e="-e" fi echo "Removing old Postman tarballs" rm -f $(ls Postman*.tar.gz) @@ -60,10 +66,10 @@ cp "Postman/resources/app/assets/icon.png" "postman_$version/usr/share/icons/hic cp -R "Postman/"* "postman_$version/opt/postman/" echo "Writing files" echo $e "[Desktop Entry]\nType=Application\nName=Postman\nGenericName=Postman API Tester\nIcon=postman\nExec=postman\nPath=/opt/postman\nCategories=Development;" > "postman_$version/opt/postman/Postman.desktop" echo $e "Package: Postman\nVersion: $version\nSection: devel\nPriority: optional\nArchitecture: amd64\nDepends: gconf2\nMaintainer: You\nDescription: Postman\n API something" > "postman_$version/DEBIAN/control" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi\n\nsudo ln -s \"/opt/postman/Postman\" \"/usr/bin/postman\"\n\ndesktop-file-install \"/opt/postman/Postman.desktop\"" > "postman_$version/DEBIAN/postinst" echo $e "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi" > "postman_$version/DEBIAN/prerm" echo "Setting modes" chmod 0775 "postman_$version/DEBIAN/postinst" @@ -79,6 +85,7 @@ dpkg-deb -b "postman_$version" > /dev/null if [ $? -gt 0 ]; then echo "Failed to build 'postman_$version.deb'" echo "If the error contained \"character '\' not allowed\", try \`$script -e\`" exit fi @@ -109,4 +116,4 @@ if [ $? -gt 0 ]; then fi echo "Removing 'postman_$version.deb'" rm -f "postman_$version.deb" -
SanderTheDragon revised this gist
Mar 23, 2018 . 1 changed file with 3 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,5 @@ #!/bin/sh echo "Removing old Postman tarballs" rm -f $(ls Postman*.tar.gz) @@ -65,9 +60,9 @@ cp "Postman/resources/app/assets/icon.png" "postman_$version/usr/share/icons/hic cp -R "Postman/"* "postman_$version/opt/postman/" echo "Writing files" echo "[Desktop Entry]\nType=Application\nName=Postman\nGenericName=Postman API Tester\nIcon=postman\nExec=postman\nPath=/opt/postman\nCategories=Development;" > "postman_$version/opt/postman/Postman.desktop" echo "Package: Postman\nVersion: $version\nSection: devel\nPriority: optional\nArchitecture: amd64\nDepends: gconf2\nMaintainer: You\nDescription: Postman\n API something" > "postman_$version/DEBIAN/control" echo "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi\n\nsudo ln -s \"/opt/postman/Postman\" \"/usr/bin/postman\"\n\ndesktop-file-install \"/opt/postman/Postman.desktop\"" > "postman_$version/DEBIAN/postinst" echo "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi" > "postman_$version/DEBIAN/prerm" echo "Setting modes" -
SanderTheDragon revised this gist
Aug 27, 2017 . No changes.There are no files selected for viewing
-
SanderTheDragon revised this gist
Jul 12, 2017 . 1 changed file with 16 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,22 +5,20 @@ versionMin="0" versionRev="1" version="$versionMaj.$versionMin-$versionRev" echo "Removing old Postman tarballs" rm -f $(ls Postman*.tar.gz) echo "Downloading latest Postman tarball" curlExists=$(command -v curl) if [ -z $curlExists ]; then wget -q --show-progress "https://dl.pstmn.io/download/latest/linux64" --content-disposition else curl -# "https://dl.pstmn.io/download/latest/linux64" -O -J fi if [ $? -gt 0 ]; then echo "Failed to download Postman tarball" exit fi @@ -29,22 +27,20 @@ if [ -d "Postman" ]; then rm -rf "Postman/" fi echo "Extracting Postman tarball" tar -xf $(ls Postman*.tar.gz) if [ $? -gt 0 ]; then echo "Failed to extract Postman tarball" exit fi versionMaj=$(ls Postman*.tar.gz | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $1 }') versionMin=$(ls Postman*.tar.gz | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $2 }') versionRev=$(ls Postman*.tar.gz | awk -F '-' '{ print $4 }' | awk -F '.' '{ print $3 }') version="$versionMaj.$versionMin-$versionRev" echo "Postman V$version" if [ -d "postman_$version" ]; then echo "Removing old 'postman_$version/'" @@ -92,7 +88,7 @@ if [ $? -gt 0 ]; then fi echo "Cleaning up" rm -f $(ls Postman*.tar.gz) rm -rf "Postman/" rm -rf "postman_$version/" -
SanderTheDragon revised this gist
May 25, 2017 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,13 @@ if [ -f "postman.tar.gz" ]; then fi echo "Downloading latest 'postman.tar.gz'" curlExists=$(command -v curl) if [ -z $curlExists ]; then wget -q --show-progress "https://dl.pstmn.io/download/latest/linux64" -o "postman.tar.gz" else curl -# "https://dl.pstmn.io/download/latest/linux64" -o "postman.tar.gz" fi if [ $? -gt 0 ]; then echo "Failed to download 'postman.tar.gz'" -
SanderTheDragon revised this gist
May 25, 2017 . No changes.There are no files selected for viewing
-
SanderTheDragon created this gist
May 25, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,115 @@ #!/bin/sh versionMaj="1" versionMin="0" versionRev="1" version="$versionMaj.$versionMin-$versionRev" if [ -f "postman.tar.gz" ]; then echo "Removing old 'postman.tar.gz'" rm -f "postman.tar.gz" fi echo "Downloading latest 'postman.tar.gz'" curl -# "https://dl.pstmn.io/download/latest/linux64" -o "postman.tar.gz" if [ $? -gt 0 ]; then echo "Failed to download 'postman.tar.gz'" exit fi if [ -d "Postman" ]; then echo "Removing old 'Postman/'" rm -rf "Postman/" fi echo "Extracting 'postman.tar.gz'" tar -xf "postman.tar.gz" if [ $? -gt 0 ]; then echo "Failed to extract 'postman.tar.gz'" exit fi if [ -f "Postman/version" ]; then versionMaj=$(cat "Postman/version" | awk -F '.' '{ print $1 }' | sed 's/[^0-9]*//g') versionMin=$(cat "Postman/version" | awk -F '.' '{ print $2 }') versionRev=$(cat "Postman/version" | awk -F '.' '{ print $3 }') version="$versionMaj.$versionMin-$versionRev" echo "Postman V$version" fi if [ -d "postman_$version" ]; then echo "Removing old 'postman_$version/'" rm -rf "postman_$version/" fi echo "Creating 'postman_$version' folder structure and files" mkdir -p "postman_$version" mkdir -p "postman_$version/usr/share/applications" touch "postman_$version/usr/share/applications/Postman.desktop" mkdir -p "postman_$version/usr/share/icons/hicolor/128x128/apps" mkdir -p "postman_$version/opt/postman" mkdir -p "postman_$version/DEBIAN" touch "postman_$version/DEBIAN/control" "postman_$version/DEBIAN/postinst" "postman_$version/DEBIAN/prerm" echo "Copying files" cp "Postman/resources/app/assets/icon.png" "postman_$version/usr/share/icons/hicolor/128x128/apps/postman.png" cp -R "Postman/"* "postman_$version/opt/postman/" echo "Writing files" echo "[Desktop Entry]\nType=Application\nName=Postman\nGenericName=Postman API Tester\nIcon=postman\nExec=postman\nPath=/opt/postman\nCategories=Development;" > "postman_$version/usr/share/applications/Postman.desktop" echo "Package: Postman\nVersion: $version\nSection: devel\nPriority: optional\nArchitecture: amd64\nDepends: \nMaintainer: You\nDescription: Postman\n API something" > "postman_$version/DEBIAN/control" echo "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi\n\nsudo ln -s \"/opt/postman/Postman\" \"/usr/bin/postman\"" > "postman_$version/DEBIAN/postinst" echo "if [ -f \"/usr/bin/postman\" ]; then\n\tsudo rm -f \"/usr/bin/postman\"\nfi" > "postman_$version/DEBIAN/prerm" echo "Setting modes" chmod 0775 "postman_$version/DEBIAN/postinst" chmod 0775 "postman_$version/DEBIAN/prerm" if [ -f "postman_$version.deb" ]; then echo "Removing old 'postman_$version.deb'" rm -f "postman_$version.deb" fi echo "Building 'postman_$version.deb'" dpkg-deb -b "postman_$version" > /dev/null if [ $? -gt 0 ]; then echo "Failed to build 'postman_$version.deb'" exit fi echo "Cleaning up" rm -f "postman.tar.gz" rm -rf "Postman/" rm -rf "postman_$version/" while true; do read -p "Do you want to install 'postman_$version.deb'[Y/n] " yn if [ -z $yn ]; then yn="y" fi case $yn in [Yy]* ) break;; [Nn]* ) exit;; esac done echo "Installing" sudo apt install "./postman_$version.deb" if [ $? -gt 0 ]; then echo "Failed to install 'postman_$version.deb'" exit fi echo "Removing 'postman_$version.deb'" rm -f "postman_$version.deb"