Skip to content

Instantly share code, notes, and snippets.

@lint
Last active November 4, 2021 01:24
Show Gist options
  • Save lint/f706db1e0fd0075e80bb7121c05d5f02 to your computer and use it in GitHub Desktop.
Save lint/f706db1e0fd0075e80bb7121c05d5f02 to your computer and use it in GitHub Desktop.
Install theos on mac without administrator access.
#!/bin/bash
echo -e "\tMaking theos directory"
cd ~/
mkdir theos
echo -e "\tSetting $THEOS path"
export THEOS=~/theos
echo "export THEOS=~/theos" > ~/.bash_profile
echo -e "\tInstalling theos"
git clone --quiet --recursive git://github.com/theos/theos.git $THEOS
echo -e "\tInstalling ldid"
cd $THEOS/bin
curl -OLs http://joedj.net/ldid
chmod -R 0777 ldid
echo -e "\tInstalling sdks"
curl -LOs https://github.com/theos/sdks/archive/master.zip
TMP=$(mktemp -d)
unzip -q master.zip -d $TMP
mv $TMP/sdks-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
echo -e "\tChanging deb compression type in theos deb.mk file"
cd $THEOS/makefiles/package
sed -e '6s/.*/_THEOS_PLATFORM_DPKG_DEB_COMPRESSION ?= $(or $(THEOS_PLATFORM_DEB_COMPRESSION_TYPE),gzip)/' -i '' deb.mk
echo -e "\t*** execute -> \"export THEOS=~/theos\" again after completion ***"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment