From 85b694006c417807327c988796fa9b5de09658c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Fri, 26 Aug 2016 11:10:52 +0200 Subject: [PATCH] script is more modular now --- setup_scripts/fedora.sh | 78 +++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/setup_scripts/fedora.sh b/setup_scripts/fedora.sh index 57debbd..941139c 100755 --- a/setup_scripts/fedora.sh +++ b/setup_scripts/fedora.sh @@ -1,31 +1,55 @@ #!/bin/bash +function pause { + read -n1 -rsp $'Press any key to continue...\n' +} +function config_git { + echo -n "Enter your name (git):" + read name + echo -n "Enter your email address (git):" + read mail + git config --global user.name $name + git config --global user.email $mail + git config --global gpg.program gpg2 + git config --global commit.gpgsign true +} +function install_software { + sudo dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm https://prerelease.keybase.io/keybase_amd64.rpm + sudo dnf copr enable -y decathorpe/syncthing #Syncthing + sudo dnf copr enable -y region51/chrome-gnome-shell #Makes the gnome extension site function in Chrome + sudo dnf install -y vlc ffmpeg hexchat menulibre htop shutter deluge syncthing* chrome-gnome-shell gnome-tweak-tool heimdall latexila texlive-scheme-full gnupg gnupg2 pass yubi* gimp digikam java-1.8.0-openjdk-devel golang compat-libstdc++-296.i686 compat-libstdc++-33.i686 compat-libstdc++-33.x86_64 ncurses-libs.i686 --best --allowerasing + sudo dnf upgrade -y +} +function config_ssh { + echo -n "Application Name (ssh key):" + read application + echo -n "Hostname (ssh key):" + read hostname + DATE=`date +%Y%m%d` + comment="$DATE - $application - $hostname" + #ssh-keygen -b 8192 -t rsa -C "$comment" -f ~/.ssh/id_rsa + cat ~/.ssh/id_rsa.pub + echo "Insert this SSH key into gogs before you continue." + pause +} +function get_gpg_keys { + gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 691C036821A1C2A05415F572F338AD3815B5D61C 33BD6633839B232E1A24BF4262BEE5EB8F370DC6 +} +function clone_git_repos { + git clone ssh://git@jcg.re:10022/jcgruenhage/.password-store.git + mkdir dev + cd dev + git clone ssh://git@jcg.re:10022/jcgruenhage/scripts.git + git clone ssh://git@jcg.re:10022/jcgruenhage/homepage.git + git clone ssh://git@jcg.re:10022/klug-O-soft/kOs_Timer.git +} + +install_software +config_ssh +config_git +clone_git_repos +get_gpg_keys + + -git config --global user.name "Jan Christian Grünhage" -git config --global user.email mail@janchristiangruenhage.de -git config --global gpg.program gpg2 -git config --global commit.gpgsign true -sudo dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm https://prerelease.keybase.io/keybase_amd64.rpm -sudo dnf copr enable -y decathorpe/syncthing -sudo dnf copr enable -y region51/chrome-gnome-shell -sudo dnf install -y vlc ffmpeg geary hexchat menulibre htop heimdall shutter deluge latexila texlive-scheme-full gnupg gnupg2 pass gimp digikam syncthing* java-1.8.0-openjdk-devel yubi* chrome-gnome-shell --best --allowerasing -sudo dnf upgrade -y -echo -n "Application Name (ssh key):" -read application -echo -n "Hostname (ssh key):" -read hostname -DATE=`date +%Y%m%d` -comment="$DATE - $application - $hostname" -ssh-keygen -b 8192 -t rsa -C "$comment" -f ~/.ssh/id_rsa -cat ~/.ssh/id_rsa.pub -echo "Insert this SSH key into gogs before you continue." -read -n1 -rsp $'Press any key to continue...\n' -cd ~ -git clone ssh://git@jcg.re:10022/jcgruenhage/.password-store.git -gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 691C036821A1C2A05415F572F338AD3815B5D61C 33BD6633839B232E1A24BF4262BEE5EB8F370DC6 -mkdir dev -cd dev -git clone ssh://git@jcg.re:10022/jcgruenhage/scripts.git -git clone ssh://git@jcg.re:10022/jcgruenhage/homepage.git -git clone ssh://git@jcg.re:10022/klug-O-soft/kOs_Timer.git