From a49f6b25735130170f6953457ba5e09385d9b6fd Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 9 Sep 2021 22:28:27 +0100 Subject: [PATCH] More android stuff --- .config/shell/aliasrc | 2 ++ .config/shell/zshrc | 5 +++++ .local/bin/setup/setupandroid | 15 +++++++++++---- .local/bin/teardown/teardownandroid | 4 ++-- .zshrc | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .config/shell/zshrc create mode 120000 .zshrc diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 76f9315..6025b5b 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -82,6 +82,8 @@ alias \ dgs="dgit status" \ dgd="dgit diff" \ dgdc="dgit diff --cached" \ + dgp="dgit push" \ + dgup="dgit pull --rebase" \ gaa="git add --all" \ gb="git branch" \ gba="git branch -a" \ diff --git a/.config/shell/zshrc b/.config/shell/zshrc new file mode 100644 index 0000000..89bb02f --- /dev/null +++ b/.config/shell/zshrc @@ -0,0 +1,5 @@ +#!/bin/zsh + +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + diff --git a/.local/bin/setup/setupandroid b/.local/bin/setup/setupandroid index 713996b..e5646c2 100755 --- a/.local/bin/setup/setupandroid +++ b/.local/bin/setup/setupandroid @@ -1,17 +1,16 @@ #! /bin/bash -doas pacman --noconfirm -S jdk-openjdk curl maven ant gradle wget +doas pacman --noconfirm -S jdk11-openjdk curl maven ant gradle wget yay -S --noconfirm --needed \ android-sdk-cmdline-tools-latest \ - android-sdk-build-tools \ android-sdk-platform-tools \ android-platform ANDROID_SDK_ROOT="/opt/android-sdk" mkdir "$HOME/.local/share/android" && touch "$HOME/.local/share/android/repositories.cfg" && \ - while true; do echo 'y'; sleep 2; done | doas sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "platforms;android-30" && \ + while true; do echo 'y'; sleep 2; done | doas sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "build-tools;30.0.3", "platforms;android-30" && \ while true; do echo 'y'; sleep 2; done | doas sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "system-images;android-30;google_apis;x86_64" && \ while true; do echo 'y'; sleep 2; done | doas sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "extras;android;m2repository" "extras;google;google_play_services" "extras;google;instantapps" "extras;google;m2repository" && \ while true; do echo 'y'; sleep 2; done | doas sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "add-ons;addon-google_apis-google-22" "add-ons;addon-google_apis-google-23" "add-ons;addon-google_apis-google-24" "skiaparser;1" @@ -31,5 +30,13 @@ doas pacman --noconfirm -S nodejs npm install -g yarn -yarn global require nativescript +yarn global require nativescript @vue/cli + +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash + +chmod +x "$HOME/.config/nvm/nvm.sh" + +bash "$HOME/.config/nvm/nvm.sh" + +nvm install 15 diff --git a/.local/bin/teardown/teardownandroid b/.local/bin/teardown/teardownandroid index 4f92cd3..c53d618 100755 --- a/.local/bin/teardown/teardownandroid +++ b/.local/bin/teardown/teardownandroid @@ -2,7 +2,7 @@ avdmanager -v delete avd -n main -doas pacman --noconfirm -Rns jdk-openjdk maven ant gradle wget +doas pacman --noconfirm -Rns jdk11-openjdk maven ant gradle wget yay -Rns --noconfirm --needed \ android-sdk-cmdline-tools-latest \ @@ -14,7 +14,7 @@ yay -Rns --noconfirm --needed \ doas groupdel android-sdk -yarn global remove nativescript +yarn global remove nativescript @vue/cli [ -d "$HOME/.android" ] && sudo rm -rf "$HOME/.android" [ -d "$HOME/.local/share/android" ] && sudo rm -rf "$HOME/.local/share/android" diff --git a/.zshrc b/.zshrc new file mode 120000 index 0000000..f8ddb17 --- /dev/null +++ b/.zshrc @@ -0,0 +1 @@ +.config/shell/zshrc \ No newline at end of file