forked from Diatrus/App2deb
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathInstall
executable file
·26 lines (26 loc) · 970 Bytes
/
Install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#App2deb Install script v1.5
if ! type dpkg &>/dev/null; then
if type brew &>/dev/null; then
echo "Installing dpkg with Homebrew..."
brew install dpkg
elif type port &>/dev/null; then
echo "Installing dpkg with MacPorts..."
sudo port install dpkg
else
echo "Installing Homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing dpkg with Homebrew..."
brew install dpkg
fi
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd "$DIR"
curl --silent -LJO https://raw.githubusercontent.com/nactro/App2deb/master/Resources/App2deb > App2deb
curl --silent -LJO https://github.com/xerub/ldid/raw/master/ldid2 > ldid2
sudo mv "App2deb" "/usr/bin/App2deb"
sudo mv "ldid2" "/usr/bin/ldid2"
sudo chmod 0777 /usr/bin/App2deb
sudo chmod 0777 /usr/bin/ldid2
echo "Success! App2deb can now be run anywhere!"
echo "Run this script again anytime to update App2deb."