48 lines
1.6 KiB
Bash
48 lines
1.6 KiB
Bash
## update and install some things we should probably have
|
|
apt-get update
|
|
apt-get install -y \
|
|
curl \
|
|
git \
|
|
gnupg2 \
|
|
jq \
|
|
sudo \
|
|
zsh \
|
|
vim \
|
|
build-essential \
|
|
openssl \
|
|
wget
|
|
|
|
echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" | sudo tee /etc/apt/sources.list.d/docker.list
|
|
echo "deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" | sudo tee /etc/apt/sources.list.d/docker-src.list
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
|
apt-get update
|
|
apt-get install -y clang-7 lldb-7 lld-7 libllvm7 llvm-7 llvm-7-dev gcc-multilib
|
|
ln -s /usr/bin/clang-7 /usr/bin/clang
|
|
ln -s /usr/bin/llvm-ar-7 /usr/bin/llvm-ar
|
|
|
|
## Install rustup and common components
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
|
|
source "$HOME/.cargo/env"
|
|
|
|
rustup install nightly
|
|
rustup component add rustfmt
|
|
rustup component add rustfmt --toolchain nightly
|
|
rustup component add clippy
|
|
rustup component add clippy --toolchain nightly
|
|
|
|
cargo install cargo-expand
|
|
cargo install cargo-edit
|
|
cargo install cargo-ndk
|
|
cargo install cargo-lipo
|
|
cargo install wasm-pack
|
|
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
|
rustup target add aarch64-apple-ios x86_64-apple-ios
|
|
|
|
|
|
## setup and install oh-my-zsh
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
cp -R /root/.oh-my-zsh /home/$USERNAME
|
|
cp /root/.zshrc /home/$USERNAME
|
|
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/$USERNAME\/.oh-my-zsh/g" /home/$USERNAME/.zshrc
|
|
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc |