sh Arch自动安装

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Arch自动安装相关的知识,希望对你有一定的参考价值。

#!/bin/bash
# REVISED ON 07/04/18
# TESTED ON 07/04/18

# I assume you've already installed Arch with base and base-devel groups and any bootloader.
# Run this as a user with sudo access. DON'T RUN THE SCRIPT AS ROOT.
# You need to enable pacman's multilib repository in /etc/pacman.conf

# Sets big font on HiDPI screens. Uncomment if needed
#sudo setfont latarcyrheb-sun32

SRC_LOCATION=/tmp
cd $SRC_LOCATION || exit

# Hardware-specific packages for my personal PC:
#bitcoin-qt broadcom-wl-dkms calibre cuda heimdall intel-ucode lib32-nvidia-utils mdadm nvidia-settings nvidia-dkms
#dcaenc openrazer-meta razercommander-git samsung-unified-driver sc-controller sensei-raw-ctl uefi-shell-git

# Theme:
#papirus-icon-theme bibata-cursor-theme adapta-gtk-theme adapta-kde kvantum-theme-adapta adapta-kde-wallpapers-git sddm-theme-aerial-git

gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53 # cower
#gpg --recv-keys --keyserver hkp://18.9.60.141 5CC908FDB71E12C2 # aqemu deps
gpg --recv-keys 8876CC8EDAEC52CEAB7742E778E2387015C1205F # linux-steam-integration
gpg --recv-keys --keyserver hkp://pgp.mit.edu 4FE5E3262872E4CC # linux-rt
gpg --recv-keys --keyserver hkp://pgp.mit.edu 38DBBDC86092693E # linux-rt
gpg --recv-keys --keyserver hkp://pgp.mit.edu 79BE3E4300411886 # linux-rt
gpg --recv-keys --keyserver pool.sks-keyservers.net 702353E0F7E48EDB # (lib32-)ncurses5-compat-libs

sudo pacman -S git --noconfirm --needed

git clone https://aur.archlinux.org/cower.git
cd cower || exit
makepkg -sic --noconfirm
cd $SRC_LOCATION || exit

git clone https://aur.archlinux.org/pacaur.git
cd pacaur || exit
makepkg -sic --noconfirm
cd $SRC_LOCATION || exit


# Arch Repositories:
PACKAGE='
    0ad 0ad-data
    android-tools
    ardour
    ark
    at
    audacity
    bleachbit
    blender
    bluez-utils bluez-plugins
    chromium pepper-flash
    cowsay ponysay fortune-mod lolcat
    cpupower
    cronie
    cryfs encfs
    cups sane gtk3-print-backends
    dconf-editor
    dolphin
    easytag
    etckeeper
    evtest
    openssh sshfs fail2ban
    falkon kget
    filelight
    filezilla
    firefox noto-fonts-cjk flashplugin
    firejail
    flatpak flatpak-builder
    gconf-editor
    glade
    gnome-builder gnome-code-assistance meson
    gnome-disk-utility
    gparted
    gst-libav
    htop iotop
    imagemagick
    jack2-dbus cadence
    jdk8-openjdk openjdk8-src
    kate
    kcalc
    kdeconnect
    kde-gtk-config
    kdenlive movit frei0r-plugins
    kdevelop
    kdialog
    kgpg
    kile
    kompare
    konsole
    konversation
    ksystemlog
    kwalletmanager
    libreoffice-fresh hunspell-en_US hyphen-en
    libvirt bridge-utils dnsmasq ebtables virt-manager
    linux-headers
    lsof
    mpd
    neovim
    networkmanager-openvpn 
    nmap traceroute
    ntfs-3g
    obs-studio
    okteta
    okular
    openmw
    p7zip
    pass pass-otp qtpass
    plasma-meta
    pulseaudio-alsa pulseaudio-bluetooth pulseaudio-equalizer
    python2 python2-pip
    python python-pip
    qbittorrent
    qemu-arch-extra ovmf
    qmmp
    qtcreator
    retroarch retroarch-assets-xmb
    riot-desktop
    samba
    scrot
    smartmontools hdparm
    spice
    steam-native-runtime
    strace
    telegram-desktop
    texinfo texlive-langcyrillic texlive-pictures texlive-science texlive-bibtexextra texlive-latexextra biber
    thefuck
    thunderbird
    traceroute
    tree
    unrar
    wget
    youtube-dl
    zsh zsh-syntax-highlighting
'
pacaur -S $PACKAGE --noconfirm --needed


# AUR:
AURPACKAGE='
    abootimg-git
    android-apktool
    android-studio
    aqemu
    autotalent
    cantata-git
    datagrip datagrip-jre
    dayjournal-bin
    fslint
    git-cola
    godot
    grc
    gthumb-git
    guvcview-qt5-git
    hunspell-ru-aot
    insomnia
    intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre
    itch
    lineageos-devel
    linux-rt-headers linux-rt
    linux-steam-integration
    lostfiles
    mellowplayer
    mpc-qt
    minecraft-technic-launcher
    neofetch
    neovim-symlinks
    nextcloud-client
    oh-my-zsh-git
    opennic-git
    pass-git-helper pass-steam-git
    peek
    pext
    pipdeptree
    pulseaudio-equalizer-ladspa
    pycharm-professional
    qemu-arm-static libguestfs
    quaternion
    simg-tools
    ttf-emojione-color
    vim-dein-git
    vk-scraper instagram-scraper
    xboxdrv
'
pacaur -S $AURPACKAGE --noconfirm --needed --noedit
# Broken: passff-host, brackets-bin

# GIMP requires deps to be installed in a specific order:
pacaur -S babl-git --noconfirm --needed --noedit
pacaur -S gegl-git --noconfirm --needed --noedit
pacaur -S gimp-devel --noconfirm --needed --noedit

# User groups:
for GROUP in \
    'audio' \
    'libvirt' \
    'kvm' \
    'sys'
do
    sudo usermod -a -G $GROUP $(whoami)
done


# .bashrc / .zshrc settings:
# 'alias firefox=\'env TZ=UTC /usr/lib/firefox/firefox\'' \
# 'alias autoremove=\'pacaur -Rns $(pacaur -Qtdq)\'' \
    
touch ~/.zshrc
for LINE in \
    'neofetch' \
    'eval $(thefuck --alias)' \
    'export ANDROID_HOME=$HOME/Android/Sdk/' \
    'export ANDROID_NDK_ROOT=$HOME/Android/Sdk/ndk-bundle/' \
    'export PATH=$HOME/Android/Sdk/emulator/:$PATH{}' \
    'export EDITOR=/bin/nvim' \
    'alias -s {avi,mpeg,mpg,mov,mkv,wmv,m2v,mp4,3gp,mp3,wav}=mpc-qt' \
    'alias -s {jpg,jpeg,png,bmp,cr2}=gthumb' \
    'alias configure="grc --colour=auto ./configure"' \
    'alias df="grc --colour=auto df"' \
    'alias diff="grc --colour=auto diff"' \
    'alias dig="grc --colour=auto dig"' \
    'alias envir="grc --colour=auto env"' \
    'alias gcc="grc --colour=auto gcc"' \
    'alias ip="grc --colour=auto ip"' \
    'alias iptables="grc --colour=auto iptables"' \
    'alias lsblk="grc --colour=auto lsblk"' \
    'alias lsmod="grc --colour=auto lsmod"' \
    'alias lspci="grc --colour=auto lspci"' \
    'alias mount="grc --colour=auto mount"' \
    'alias ping="grc --colour=auto ping"' \
    'alias ps="grc --colour=auto ps"' \
    'alias traceroute="grc --colour=auto traceroute"' \
    'alias uptime="grc --colour=auto uptime"'
do
    grep -qF "$LINE" "~/.bashrc" || echo "$LINE" >> "~/.bashrc"
    grep -qF "$LINE" "~/.zshrc" || echo "$LINE" >> "~/.zshrc"
done
source ~/.bashrc


git config --global cola.icontheme dark
git config --global cola.color.remove f24343
git config --global cola.color.add 7fd140
git config --global credential.helper /usr/bin/pass-git-helper


# Enable systemd services:
for SERVICE in \
    atd \
    NetworkManager \
    bluetooth \
    opennic \
    org.cups.cupsd \
    smartd \
    cronie \
    libvirtd \
    sddm
do
    sudo systemctl enable $SERVICE
    sudo systemctl start $SERVICE
done

以上是关于sh Arch自动安装的主要内容,如果未能解决你的问题,请参考以下文章

sh 最终的Arch Linux安装脚本

sh Arch安装GPT + GRUB BIOS

sh Insomnia REST Client Arch安装程序

sh 在Arch上安装SNX / Checkpoint VPN

sh 安装Arch Linux GPT + GRUB UEFI

sh 列表打包安装在Arch Linux中(base / base-devel除外)