Skip to content

Instantly share code, notes, and snippets.

@hersche
Created December 12, 2016 17:34
Show Gist options
  • Save hersche/8dca035efb6316374b54527930f7004e to your computer and use it in GitHub Desktop.
Save hersche/8dca035efb6316374b54527930f7004e to your computer and use it in GitHub Desktop.
Personal script for play around in bash and do shortcuts
#!/bin/bash
if [ "$1" = "setup" ]; then
if [ "$2" = "" ]; then
echo "use it like"
echo "v setup de de"
exit
fi
if [ "$3" = "" ]; then
echo "set second language to first"
echo "basicly use it like:"
echo "v setup de de"
sudo apt install language-pack-kde-$2 firefox-locale-$2 language-pack-$2 libreoffice-l10n-$2 myspell-$2-$2 ubuntu-restricted-extras kubuntu-restricted-extras vlc
exit
fi
sudo apt install language-pack-kde-$2 firefox-locale-$2 language-pack-$2 libreoffice-l10n-$2 myspell-$2-$3 ubuntu-restricted-extras kubuntu-restricted-extras vlc
fi
if [ "$1" = "j" ]; then
if [ "$2" = "8" ]; then
echo "Set OpenJdK 8"
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
fi
if [ "$2" = "7" ]; then
echo "Set closed OpenJdK 7"
export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/"
fi
if [ "$2" = "7c" ]; then
echo "Set closed orcale Java 7"
export JAVA_HOME="/usr/lib/jvm/java-7-oracle/"
fi
if [ "$2" = "" ]; then
echo "Set either 7, 7c or 8, nothing's done now.."
fi
fi
if [ "$1" = "cm" ]; then
if [ "$2" = "12" ]; then
echo "Init cyanogenmod 12.1"
cd /home/hersche/Cyanogen/cm12.1
source build/envsetup.sh
v j 7
fi
if [ "$2" = "13" ]; then
echo "Init cyanogenmod 13.0"
cd /home/hersche/Cyanogen/cm13
source build/envsetup.sh
v j 8
fi
if [ "$2" = "" ]; then
echo "Set either 12 or 13 to choose your cyanogenmod-version"
fi
fi
if [ "$1" = "up" ]; then
echo "Full system upgrade!"
sudo apt update; sudo apt upgrade
fi
if [ "$1" = "" ]; then
echo "No input"
echo "cm = prep Cyanogenmod"
echo "up = update sys"
echo "j = set JAVA_HOME"
sleep 1;
echo -ne "."
sleep 1
echo -ne "."
sleep 1
echo -ne "."
sleep 1
echo -ne "."
sleep 1
echo -ne "."
sleep 1
echo -ne "are u alive?"
sleep 2
echo "!?!?"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment