128 lines
4.5 KiB
Bash
Executable file
128 lines
4.5 KiB
Bash
Executable file
#!/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
|
|
git config --global help.autocorrect 50
|
|
git config --list
|
|
}
|
|
function install_rpms {
|
|
#Google Play Music Desktop Player
|
|
export rpm_links=$(curl -s \
|
|
https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases \
|
|
| grep browser_download_url | grep '64[.]rpm' | head -n 1 | cut -d '"' -f 4)
|
|
|
|
#Keybase
|
|
export rpm_links="$rpm_links https://prerelease.keybase.io/keybase_amd64.rpm"
|
|
|
|
#Install RPMs specified above.
|
|
sudo dnf install -y $rpm_links
|
|
}
|
|
function install_pip_packages {
|
|
sudo pip install --upgrade pip
|
|
sudo pip install --upgrade borgmatic
|
|
}
|
|
function install_omz {
|
|
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
|
|
sudo sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
|
|
}
|
|
function install_dnf_packages {
|
|
export packages="vlc ffmpeg" #Multimedia Stuff
|
|
export packages="$packages hexchat gajim" #Messaging
|
|
export packages="$packages pcsc-lite" #Libraries
|
|
export packages="$packages chromium" #Browsers
|
|
export packages="$packages nextcloud-client" #Nextcloud Client
|
|
export packages="$packages menulibre shutter deluge syncthing* yubi*" #GUI Tools
|
|
export packages="$packages htop vim pass heimdall borgbackup" #Command Line Tools
|
|
export packages="$packages gimp digikam" #Photography
|
|
export packages="$packages gnome-tweak-tool" #Gnome
|
|
export packages="$packages xournal" #Stylusstuff
|
|
export packages="$packages latexila texlive-scheme-medium" #LaTeX
|
|
export packages="$packages zsh powerline powerline-fonts" #SDKs
|
|
export packages="$packages java-1.8.0-openjdk* golang" #SDKs
|
|
export packages="$packages exfat-utils fuse-exfat" #ExFAT
|
|
#Android SDK Dependencies
|
|
export packages="$packages compat-libstdc++-296.i686 compat-libstdc++-33.i686 compat-libstdc++-33.x86_64 ncurses-libs.i686"
|
|
sudo dnf install -y $packages --best --allowerasing
|
|
sudo dnf upgrade -y
|
|
}
|
|
function install_source_packages {
|
|
git clone https://github.com/vibou/vibou.gTile.git ~/.local/share/gnome-shell/extensions/gTile@vibou
|
|
}
|
|
function install_software {
|
|
add_repos
|
|
install_rpms
|
|
install_dnf_packages
|
|
install_pip_packages
|
|
install_source_packages
|
|
install_omz
|
|
}
|
|
function add_repos {
|
|
#Negativo17 Fedora Multimedia
|
|
sudo dnf config-manager --add-repo=http://negativo17.org/repos/fedora-multimedia.repo
|
|
#RPM-Fusion Free
|
|
sudo dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
|
#RPM-Fusion Non Free
|
|
sudo dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
|
#Syncthing
|
|
sudo dnf copr enable -y decathorpe/syncthing
|
|
#Nextcloud Client
|
|
sudo dnf copr enable -y tpokorra/nextcloud
|
|
}
|
|
function setup_gpg_ssh {
|
|
gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 816054803C0F5F14C462398B3D512CA0D8E8352E
|
|
sudo systemctl enable pcscd && sudo systemctl start pcscd
|
|
sudo pkill -9 gpg-agent
|
|
eval $(gpg-agent --daemon --enable-ssh-support --sh)
|
|
}
|
|
function clone_git_repos {
|
|
cd ~
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/.password-store.git
|
|
|
|
mkcdir dev
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/scripts.git
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/prog16_17.git
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/homepage.git
|
|
git clone ssh://git@jcg.re:10022/klug-O-soft/kOs_Timer.git
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/config-files.git
|
|
|
|
mkcdir gopath/src/git.jcg.re/jcgruenhage/
|
|
git clone ssh://git@jcg.re:10022/jcgruenhage/go_helloworld.git
|
|
|
|
cd ../../../..
|
|
git clone ssh://git@github.com/jcgruenhage/freeotp-android.git
|
|
git clone ssh://git@github.com/jcgruenhage/nextcloud-android.git
|
|
git clone ssh://git@github.com/jcgruenhage/PlayMusicExporter.git
|
|
}
|
|
function mkcdir {
|
|
mkdir -p -- "$1" &&
|
|
cd -P -- "$1"
|
|
}
|
|
function configure {
|
|
pushd
|
|
cd ~/dev/config-files
|
|
#Copy run command files
|
|
cp -f .*rc ~
|
|
sudo cp -f .*rc /root/
|
|
sudo cp -f borgmatic.* /etc/systemd/system/
|
|
sudo cp -rf borgmatic /etc/
|
|
sudo systemctl enable borgmatic.timer
|
|
sudo systemctl start borgmatic.timer
|
|
popd
|
|
}
|
|
|
|
# Execution:
|
|
install_software
|
|
setup_gpg_ssh
|
|
config_git
|
|
clone_git_repos
|
|
configure
|