2016-08-25 21:40:44 +00:00
|
|
|
#!/bin/bash
|
2016-08-26 09:10:52 +00:00
|
|
|
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
|
2016-09-02 12:52:12 +00:00
|
|
|
git config --global user.name "$name"
|
2016-08-26 09:10:52 +00:00
|
|
|
git config --global user.email $mail
|
|
|
|
git config --global gpg.program gpg2
|
|
|
|
git config --global commit.gpgsign true
|
2016-09-18 16:58:28 +00:00
|
|
|
git config --global help.autocorrect 50
|
2016-09-02 12:56:39 +00:00
|
|
|
git config --list
|
2016-08-26 09:10:52 +00:00
|
|
|
}
|
2017-01-24 19:18:45 +00:00
|
|
|
function install_rpms {
|
|
|
|
#Keybase
|
2017-08-02 18:32:59 +00:00
|
|
|
export rpm_links="https://prerelease.keybase.io/keybase_amd64.rpm"
|
2017-01-24 19:18:45 +00:00
|
|
|
|
|
|
|
#Install RPMs specified above.
|
2016-09-18 16:58:28 +00:00
|
|
|
sudo dnf install -y $rpm_links
|
2017-01-24 19:18:45 +00:00
|
|
|
}
|
2017-04-09 10:26:57 +00:00
|
|
|
function install_pip_packages {
|
|
|
|
sudo pip install --upgrade pip
|
2017-08-02 18:32:59 +00:00
|
|
|
sudo pip install powerline-status
|
2017-04-09 12:46:11 +00:00
|
|
|
}
|
2017-04-09 10:26:57 +00:00
|
|
|
function install_dnf_packages {
|
2016-09-18 16:58:28 +00:00
|
|
|
export packages="vlc ffmpeg" #Multimedia Stuff
|
2017-08-02 18:32:59 +00:00
|
|
|
export packages="$packages pcsc-lite pinentry-gtk" #Smartcard/Crypto
|
2017-03-10 20:15:10 +00:00
|
|
|
export packages="$packages chromium" #Browsers
|
2017-01-24 19:22:37 +00:00
|
|
|
export packages="$packages nextcloud-client" #Nextcloud Client
|
2017-08-02 18:32:59 +00:00
|
|
|
export packages="$packages menulibre deluge syncthing* yubi*" #GUI Tools
|
2017-04-09 10:26:57 +00:00
|
|
|
export packages="$packages htop vim pass heimdall borgbackup" #Command Line Tools
|
2016-09-18 16:58:28 +00:00
|
|
|
export packages="$packages gimp digikam" #Photography
|
2016-11-30 18:29:44 +00:00
|
|
|
export packages="$packages xournal" #Stylusstuff
|
2017-04-09 10:26:57 +00:00
|
|
|
export packages="$packages latexila texlive-scheme-medium" #LaTeX
|
2017-08-02 18:32:59 +00:00
|
|
|
export packages="$packages zsh hack-fonts antigen" #Shellstuff
|
2017-01-24 19:22:37 +00:00
|
|
|
export packages="$packages java-1.8.0-openjdk* golang" #SDKs
|
|
|
|
export packages="$packages exfat-utils fuse-exfat" #ExFAT
|
2016-09-18 16:58:28 +00:00
|
|
|
#Android SDK Dependencies
|
|
|
|
export packages="$packages compat-libstdc++-296.i686 compat-libstdc++-33.i686 compat-libstdc++-33.x86_64 ncurses-libs.i686"
|
2017-08-02 18:32:59 +00:00
|
|
|
export packages="$packages libxcb-devel libXft-devel" #Libraries
|
2016-09-18 16:58:28 +00:00
|
|
|
sudo dnf install -y $packages --best --allowerasing
|
2016-08-26 09:10:52 +00:00
|
|
|
sudo dnf upgrade -y
|
2017-04-09 10:26:57 +00:00
|
|
|
}
|
|
|
|
function install_software {
|
|
|
|
add_repos
|
|
|
|
install_rpms
|
|
|
|
install_dnf_packages
|
|
|
|
install_pip_packages
|
2017-08-02 18:32:59 +00:00
|
|
|
install_other
|
|
|
|
}
|
|
|
|
function install_other {
|
|
|
|
#Rust
|
|
|
|
curl https://sh.rustup.rs -sSf | sh
|
|
|
|
install_lemonbar
|
|
|
|
}
|
|
|
|
function install_lemonbar {
|
|
|
|
cd ~/dev
|
|
|
|
git clone https://github.com/krypt-n/bar lemonbar-xft
|
|
|
|
cd lemonbar-xft
|
|
|
|
make
|
|
|
|
sudo cp lemonbar /usr/local/bin
|
2016-08-26 09:10:52 +00:00
|
|
|
}
|
2017-01-24 19:18:45 +00:00
|
|
|
function add_repos {
|
|
|
|
#Negativo17 Fedora Multimedia
|
|
|
|
sudo dnf config-manager --add-repo=http://negativo17.org/repos/fedora-multimedia.repo
|
2017-08-02 18:32:59 +00:00
|
|
|
#Antigen
|
|
|
|
sudo dnf config-manager --add-repo http://download.opensuse.org/repositories/shells:zsh-users:antigen/Fedora_26/shells:zsh-users:antigen.repo
|
2017-01-24 19:18:45 +00:00
|
|
|
#RPM-Fusion Free
|
2017-03-10 20:15:10 +00:00
|
|
|
sudo dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
2017-01-24 19:18:45 +00:00
|
|
|
#RPM-Fusion Non Free
|
2017-03-10 20:15:10 +00:00
|
|
|
sudo dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
2017-01-24 19:18:45 +00:00
|
|
|
#Syncthing
|
|
|
|
sudo dnf copr enable -y decathorpe/syncthing
|
|
|
|
#Nextcloud Client
|
|
|
|
sudo dnf copr enable -y tpokorra/nextcloud
|
2017-08-02 18:32:59 +00:00
|
|
|
#Hack font
|
|
|
|
sudo dnf copr enable -y heliocastro/hack-fonts
|
2017-01-24 19:18:45 +00:00
|
|
|
}
|
|
|
|
function setup_gpg_ssh {
|
|
|
|
gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 816054803C0F5F14C462398B3D512CA0D8E8352E
|
|
|
|
sudo systemctl enable pcscd && sudo systemctl start pcscd
|
2017-03-10 20:15:10 +00:00
|
|
|
sudo pkill -9 gpg-agent
|
2017-01-24 19:18:45 +00:00
|
|
|
eval $(gpg-agent --daemon --enable-ssh-support --sh)
|
2016-08-26 09:10:52 +00:00
|
|
|
}
|
|
|
|
function clone_git_repos {
|
2016-09-17 15:48:43 +00:00
|
|
|
cd ~
|
2016-08-26 09:10:52 +00:00
|
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/.password-store.git
|
2017-01-24 19:18:45 +00:00
|
|
|
|
|
|
|
mkcdir dev
|
2016-08-26 09:10:52 +00:00
|
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/scripts.git
|
2016-11-30 18:29:44 +00:00
|
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/prog16_17.git
|
2016-08-26 09:10:52 +00:00
|
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/homepage.git
|
2017-01-24 19:18:45 +00:00
|
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/config-files.git
|
2016-08-26 09:10:52 +00:00
|
|
|
|
2017-01-24 19:18:45 +00:00
|
|
|
mkcdir gopath/src/git.jcg.re/jcgruenhage/
|
|
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/go_helloworld.git
|
|
|
|
|
2017-08-02 18:32:59 +00:00
|
|
|
cd ~/dev
|
2017-01-24 19:18:45 +00:00
|
|
|
git clone ssh://git@github.com/jcgruenhage/freeotp-android.git
|
|
|
|
git clone ssh://git@github.com/jcgruenhage/nextcloud-android.git
|
2017-03-10 20:15:10 +00:00
|
|
|
git clone ssh://git@github.com/jcgruenhage/PlayMusicExporter.git
|
2017-01-24 19:18:45 +00:00
|
|
|
}
|
|
|
|
function mkcdir {
|
|
|
|
mkdir -p -- "$1" &&
|
|
|
|
cd -P -- "$1"
|
|
|
|
}
|
2017-04-09 10:26:57 +00:00
|
|
|
function configure {
|
|
|
|
cd ~/dev/config-files
|
2017-08-02 18:32:59 +00:00
|
|
|
cp .zshrc ~
|
|
|
|
cp .config/i3/config ~/.config/i3
|
|
|
|
cp .Xdefaults ~
|
|
|
|
cp .xinitrc ~
|
2017-01-24 19:18:45 +00:00
|
|
|
}
|
|
|
|
# Execution:
|
2017-04-09 10:26:57 +00:00
|
|
|
install_software
|
|
|
|
setup_gpg_ssh
|
|
|
|
config_git
|
2016-08-26 09:10:52 +00:00
|
|
|
clone_git_repos
|