Skip to content

Instantly share code, notes, and snippets.

@ShivamKumarJha
Last active January 24, 2020 11:17
Show Gist options
  • Save ShivamKumarJha/032e8ce97fcd4ffdd1f3633c11efb4c0 to your computer and use it in GitHub Desktop.
Save ShivamKumarJha/032e8ce97fcd4ffdd1f3633c11efb4c0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2019 Shivam Kumar Jha <[email protected]>
#
# Helper functions
# Store project path
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit 1
fi
# Install some packages
if [[ -e "/usr/bin/apt-get" ]]; then
apt-get install -y android-tools-fsutils aria2 arj brotli cabextract cmake device-tree-compiler file-roller g++ git liblz4-tool liblzma-dev libtinyxml2-dev mpack openjdk-8-jdk p7zip-full p7zip-rar python-pip python3-pip rar sharutils unace unrar unzip uudeview zip
elif [[ -e "/usr/bin/pacman" ]]; then
pacman -Syu --noconfirm android-tools aria2 arj brotli cabextract cmake dtc file-roller gcc git lz4 xz tinyxml2 mpack jdk8-openjdk p7zip python2-pip python-pip rar unrar sharutils unace zip unzip uudeview zip
fi
pip install backports.lzma protobuf pycrypto zstandard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment