merged scripts
This commit is contained in:
commit
4b957e5039
4 changed files with 59 additions and 107 deletions
19
devware.csv
19
devware.csv
|
@ -1,16 +1,27 @@
|
||||||
NAME,DESCRIPTION,GIT,
|
NAME,DESCRIPTION,GIT,
|
||||||
build-base,"Meta package for build base",D,
|
build-base,"Meta package for build base",D,
|
||||||
|
patch,"Utility to apply diffs to files",D,
|
||||||
tcc,"Tiny C Compiler",D,
|
tcc,"Tiny C Compiler",D,
|
||||||
tcc-libs,"Tiny C Compiler (libraries)",D,
|
tcc-libs,"Tiny C Compiler (libraries)",D,
|
||||||
tcc-libs-static,"Tiny C Compiler (static library)",D,
|
tcc-libs-static,"Tiny C Compiler (static library)",D,
|
||||||
clang20,"C language family front-end for LLVM",D,
|
clang20,"C language family front-end for LLVM",D,
|
||||||
libinput,"Library for handling input devices",D,
|
clang20-extra-tools,"Extra tools built using Clang's tooling APIs",D,
|
||||||
|
tinymist,"Language service for Typst",D,
|
||||||
|
git,"Distributed version control system",D,
|
||||||
|
tar,"Utility used to store, backup, and transport files",D,
|
||||||
|
curl,"URL retrival utility and library",D,
|
||||||
|
wl-clipboard,"Command-line copy/paste utilities for Wayland",D,
|
||||||
|
bash,"The GNU Bourne Again shell",D,
|
||||||
libinput-dev,"Library for handling input devices (development files)",D,
|
libinput-dev,"Library for handling input devices (development files)",D,
|
||||||
wayland,"A computer display server protocol",D,
|
|
||||||
wayland-dev,"A computer display server protocol (development files)",D,
|
wayland-dev,"A computer display server protocol (development files)",D,
|
||||||
wlroots,"Modular Wayland compositor library",D,
|
|
||||||
wlroots-dev,"Modular Wayland compositor library (development files)",D,
|
wlroots-dev,"Modular Wayland compositor library (development files)",D,
|
||||||
libxkbcommon,"keyboard handling library",D,
|
|
||||||
libxkbcommon-dev,"keyboard handling library (development files)",D,
|
libxkbcommon-dev,"keyboard handling library (development files)",D,
|
||||||
wayland-protocols,"Protocols and protocol extensions complementing the Wayland core protocol",D,
|
wayland-protocols,"Protocols and protocol extensions complementing the Wayland core protocol",D,
|
||||||
pkgconf,"development framework configuration tools",D,
|
pkgconf,"development framework configuration tools",D,
|
||||||
|
neovim,"Vim-fork focused on extensibility and agility",D,
|
||||||
|
fcft-dev,"Simple library for font loading and glyph rasterization using FontConfig, FreeType and pixman (development files)",D,
|
||||||
|
ripgrep,"ripgrep combines the usability of The Silver Searcher with the raw speed of grep",D,
|
||||||
|
alsa-lib-dev,"Advanced Linux Sound Architecture (ALSA) library (development files)",D,
|
||||||
|
file-dev,"File type identification utility (development files)",D,
|
||||||
|
openssl-dev,"Toolkit for Transport Layer Security (TLS) (development files)",D,
|
||||||
|
|
||||||
|
|
|
89
installer.sh
89
installer.sh
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
dotfiles="https://git.amolinae.com/amolinae06/dotfiles.git"
|
dotfiles="https://git.amolinae.com/amolinae06/dotfiles.git"
|
||||||
software="https://git.amolinae.com/amolinae06/installer/raw/branch/main/software.csv"
|
software="https://git.amolinae.com/amolinae06/installer/raw/branch/main/software.csv"
|
||||||
postinstall="https://git.amolinae.com/amolinae06/installer/raw/branch/main/postinstall.sh"
|
devware="https://git.amolinae.com/amolinae06/installer/raw/branch/main/devware.csv"
|
||||||
|
|
||||||
apk_install(){
|
apk_install(){
|
||||||
echo "installing $1"; apk add "$1" >/dev/null 2>&1
|
echo "installing $1"; doas apk add "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
bwapk_install (){
|
||||||
|
echo "installing $1 on chroot environment"
|
||||||
|
doas bwroot apk add "$1" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
git_install(){
|
git_install(){
|
||||||
echo "cloning from $1"; su - "$user" -c "cd ~/.local/src && git clone \"$1\"" >/dev/null 2>&1
|
echo "cloning from $1"; cd $HOME/.local/src && git clone \"$1\" >/dev/null 2>&1
|
||||||
}
|
|
||||||
|
|
||||||
deploy_dotfiles(){
|
|
||||||
printf "Deploying dotfiles...\n"
|
|
||||||
su - $user -c "git clone $dotfiles && cd dotfiles && rm -rf .git .gitmodules README.md && cp -r .cache .config .local .zprofile /home/$user/ && cd && rm -rf dotfiles"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
read_software(){
|
read_software(){
|
||||||
|
@ -24,6 +24,7 @@ read_software(){
|
||||||
case "$GIT" in
|
case "$GIT" in
|
||||||
"N") apk_install $NAME ;;
|
"N") apk_install $NAME ;;
|
||||||
"Y") git_install "$GIT_URL" ;;
|
"Y") git_install "$GIT_URL" ;;
|
||||||
|
"D") bwapk_install $NAME ;;
|
||||||
*) echo "ERROR: failed to determine $NAME."; exit 1 ;;
|
*) echo "ERROR: failed to determine $NAME."; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -35,85 +36,81 @@ read_software(){
|
||||||
setup_greetd(){
|
setup_greetd(){
|
||||||
printf "Setting up greetd\n"
|
printf "Setting up greetd\n"
|
||||||
|
|
||||||
# Check if greetd directory exists, if not, create it.
|
|
||||||
[ -d "/etc/greetd" ] || mkdir "/etc/greetd"
|
[ -d "/etc/greetd" ] || mkdir "/etc/greetd"
|
||||||
|
|
||||||
cat <<EOF > /etc/greetd/config.toml
|
doas cat <<EOF > /etc/greetd/config.toml
|
||||||
[terminal]
|
[terminal]
|
||||||
vt = 7
|
vt = 7
|
||||||
|
|
||||||
[default_session]
|
[default_session]
|
||||||
command = "tuigreet -t -r --cmd /home/$user/.local/bin/dwllaunch"
|
command = "agreety -t -r --cmd /home/$USER/.local/bin/dwllaunch"
|
||||||
user = "greetd"
|
user = "greetd"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
rc-update add greetd default
|
doas rc-update add greetd default
|
||||||
printf "Finished setting up greetd.\n"
|
printf "Finished setting up greetd.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_shell(){
|
setup_shell(){
|
||||||
sed -i "/^$user:/s#:[^:]*\$#:/bin/zsh#" /etc/passwd
|
doas sed -i "/^$USER:/s#:[^:]*\$#:/bin/zsh#" /etc/passwd
|
||||||
mkdir -p "/home/$user/.cache/zsh"
|
mkdir -p $HOME/.cache/zsh
|
||||||
touch "/home/$user/.cache/zsh/history"
|
touch $HOME/.cache/zsh/history
|
||||||
chown -R "$user":"$user" "/home/$user/.cache/"
|
echo "changed $USER's shell to zsh"
|
||||||
echo "changed "$user"'s shell to zsh"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_bluetooth(){
|
setup_bluetooth(){
|
||||||
printf "Setting up bluetooth\n"
|
printf "Setting up bluetooth\n"
|
||||||
rc-update add bluetooth default
|
doas rc-update add bluetooth default
|
||||||
printf "Done.\n"
|
printf "Done.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_home(){
|
setup_home(){
|
||||||
su - $user -c "xdg-user-dirs-update && mkdir ~/Documents/Miscellaneous"
|
doas apk add git
|
||||||
|
printf "Deploying dotfiles...\n"
|
||||||
|
git clone --recursive $dotfiles
|
||||||
|
cd dotfiles
|
||||||
|
rm -rf .git .gitmodules
|
||||||
|
cp -r .cache .config .local .zprofile $HOME
|
||||||
|
cd $HOME
|
||||||
|
rm -rf dotfiles/
|
||||||
|
xdg-user-dirs-update
|
||||||
|
mkdir $HOME/Documents/Miscellaneous
|
||||||
|
export PATH="$PATH:$(find ~/.local/bin -type d | paste -sd ':' -)"
|
||||||
|
doas apk del git
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_chroot(){
|
setup_chroot(){
|
||||||
printf "Setting up chroot\n"
|
printf "Setting up chroot\n"
|
||||||
apk_install curl
|
apk_install curl
|
||||||
cd "/home/$user/Documents/Miscellaneous"
|
cd $HOME/Documents/Miscellaneous
|
||||||
mkdir alpchroot
|
mkdir alpchroot
|
||||||
curl -LO https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/apk-tools-static-2.14.4-r1.apk
|
curl -LO https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/apk-tools-static-2.14.4-r1.apk
|
||||||
tar -xzf apk-tools-static-*.apk
|
tar -xzf apk-tools-static-*.apk
|
||||||
./sbin/apk.static -X https://dl-cdn.alpinelinux.org/alpine/v3.20/main -U --allow-untrusted -p alpchroot/ --initdb add alpine-base
|
./sbin/apk.static -X https://dl-cdn.alpinelinux.org/alpine/v3.20/main -U --allow-untrusted -p alpchroot/ --initdb add alpine-base
|
||||||
mount -o bind /dev alpchroot/dev
|
doas cp -L /etc/resolv.conf alpchroot/etc/
|
||||||
mount -t proc none alpchroot/proc
|
doas chown -R $USER:$USER alpchroot/ >/dev/null 2>&1
|
||||||
mount -o bind /sys alpchroot/sys
|
|
||||||
cp -L /etc/resolv.conf alpchroot/etc/
|
|
||||||
chown -R "$user":"$user" alpchroot/ >/dev/null 2>&1
|
|
||||||
mkdir -p alpchroot/etc/apk
|
mkdir -p alpchroot/etc/apk
|
||||||
cp /etc/apk/repositories alpchroot/etc/apk/repositories
|
doas cp /etc/apk/repositories alpchroot/etc/apk/repositories
|
||||||
apk del curl
|
doas apk del curl
|
||||||
printf "Finished setting up chroot!\n"
|
printf "Finished setting up chroot!\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install(){
|
compile() {
|
||||||
printf "Postinstall\n"
|
cd "$HOME/.local/src/$1/"
|
||||||
([ -f "$postinstall" ] && cp "$postinstall" /tmp/postinstall.sh) || wget -qO- "$1" > /tmp/postinstall.sh
|
bwroot make clean install
|
||||||
su - "$user" -c "zsh -lc 'sh /tmp/postinstall.sh \"$@\" '"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_root(){
|
compile "dwl"
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
|
||||||
echo "ERROR: you must run this script as root."; exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get_user(){
|
|
||||||
printf "Please enter the name of your user: "
|
|
||||||
read -r user
|
|
||||||
}
|
|
||||||
|
|
||||||
check_root
|
|
||||||
echo "Welcome to the installer"
|
echo "Welcome to the installer"
|
||||||
apk_install git
|
|
||||||
get_user
|
get_user
|
||||||
read_software "$software"
|
read_software "$software"
|
||||||
setup_home
|
setup_home
|
||||||
deploy_dotfiles
|
|
||||||
setup_greetd
|
setup_greetd
|
||||||
setup_shell
|
setup_shell
|
||||||
setup_bluetooth
|
setup_bluetooth
|
||||||
setup_chroot
|
setup_chroot
|
||||||
post_install "$user"
|
read_software "$devware"
|
||||||
|
compile dwl
|
||||||
|
compile slstatus
|
||||||
|
compile hellwal
|
||||||
|
compile ctpv
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
software="https://git.amolinae.com/amolinae06/installer/raw/branch/main/devware.csv"
|
|
||||||
|
|
||||||
apk_install(){
|
|
||||||
echo "installing $1"; bwroot apk add "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
read_software(){
|
|
||||||
([ -f "$1" ] && cp "$1" /tmp/temp.csv) || wget -qO- "$1" > /tmp/temp.csv
|
|
||||||
|
|
||||||
tail -n +2 "/tmp/temp.csv" | sed -E ':a; s/("[^"]*),([^"]*")/\1\2/; ta' | while IFS=',' read -r NAME DESCRIPTION GIT GIT_URL; do
|
|
||||||
case "$GIT" in
|
|
||||||
"D") apk_install $NAME ;;
|
|
||||||
*) echo "ERROR: failed to determine $NAME."; exit 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
rm "/tmp/temp.csv"
|
|
||||||
printf "Successfully installed all software!\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
make_dwl() {
|
|
||||||
cd $HOME/.local/src/dwl/
|
|
||||||
bwroot make install
|
|
||||||
}
|
|
||||||
|
|
||||||
make_slstatus() {
|
|
||||||
cd $HOME/.local/src/slstatus/
|
|
||||||
bwroot make install
|
|
||||||
}
|
|
||||||
|
|
||||||
make_ctpv() {
|
|
||||||
cd $HOME/.local/src/hellwal/
|
|
||||||
bwroot make install
|
|
||||||
}
|
|
||||||
|
|
||||||
make_hellwal() {
|
|
||||||
cd $HOME/.local/src/hellwal/
|
|
||||||
bwroot make install
|
|
||||||
}
|
|
||||||
|
|
||||||
cd "/home/$@/"
|
|
||||||
read_software $software
|
|
||||||
make_dwl
|
|
||||||
make_slstatus
|
|
||||||
make_ctpv
|
|
||||||
make_hellwal
|
|
10
software.csv
10
software.csv
|
@ -9,10 +9,7 @@ fastfetch,"Maintained, feature-rich and performance oriented", neofetch-like sys
|
||||||
ffmpeg,"Complete and free Internet live audio and video broadcasting solution for Linux/Unix",N,
|
ffmpeg,"Complete and free Internet live audio and video broadcasting solution for Linux/Unix",N,
|
||||||
foot,"Fast, lightweight and minimalistic Wayland terminal emulator",N,
|
foot,"Fast, lightweight and minimalistic Wayland terminal emulator",N,
|
||||||
fuzzel,"Application launcher for wlroots-based Wayland compositors",N,
|
fuzzel,"Application launcher for wlroots-based Wayland compositors",N,
|
||||||
git,"Distributed version control system",N,
|
|
||||||
gnome-keyring,"GNOME keyring",N,
|
|
||||||
greetd,"Minimal and flexible login manager daemon",N,
|
greetd,"Minimal and flexible login manager daemon",N,
|
||||||
greetd-tuigreet,"Graphical console greeter for greetd",N,
|
|
||||||
grim,"Grabs images from Wayland compositors",N,
|
grim,"Grabs images from Wayland compositors",N,
|
||||||
imv-wayland,"Image viewer for Wayland",N,
|
imv-wayland,"Image viewer for Wayland",N,
|
||||||
kanshi,"Dynamic display configuration for Wayland",N,
|
kanshi,"Dynamic display configuration for Wayland",N,
|
||||||
|
@ -24,9 +21,6 @@ libxkbcommon,"keyboard handling library",N,
|
||||||
mako,"A lightweight notification daemon for Wayland",N,
|
mako,"A lightweight notification daemon for Wayland",N,
|
||||||
mpv,"Video player based on MPlayer/mplayer2",N,
|
mpv,"Video player based on MPlayer/mplayer2",N,
|
||||||
ncpamixer,"ncurses PulseAudio Mixer",N,
|
ncpamixer,"ncurses PulseAudio Mixer",N,
|
||||||
neovim,"Vim-fork focused on extensibility and agility",N,
|
|
||||||
font-noto,"Noto font families for Latin, Cyrillic and Greek scripts",N,
|
|
||||||
font-noto-cjk,"Google's font family that aims to support all the world's languages (cjk)",N,
|
|
||||||
openssh,"Port of OpenBSD's free SSH release",N,
|
openssh,"Port of OpenBSD's free SSH release",N,
|
||||||
papirus-icon-theme,"papirus icon theme",N,
|
papirus-icon-theme,"papirus icon theme",N,
|
||||||
pipewire,"Multimedia processing graphs",N,
|
pipewire,"Multimedia processing graphs",N,
|
||||||
|
@ -34,14 +28,12 @@ pipewire-alsa,"ALSA support for pipewire",N,
|
||||||
pipewire-jack,"JACK support for pipewire",N,
|
pipewire-jack,"JACK support for pipewire",N,
|
||||||
pipewire-pulse,"Pulseaudio support for pipewire",N,
|
pipewire-pulse,"Pulseaudio support for pipewire",N,
|
||||||
pipewire-spa-bluez, "PipeWire BlueZ5 SPA plugin (Bluetooth)",N
|
pipewire-spa-bluez, "PipeWire BlueZ5 SPA plugin (Bluetooth)",N
|
||||||
ripgrep,"ripgrep combines the usability of The Silver Searcher with the raw speed of grep",N,
|
|
||||||
sc-im,"ncurses spreadsheet program based on SC",N,
|
sc-im,"ncurses spreadsheet program based on SC",N,
|
||||||
slurp,"Interaction screen selection on Wayland compositors",N,
|
slurp,"Interaction screen selection on Wayland compositors",N,
|
||||||
spotify-player,"Command driven spotify player",N,
|
spotify-player,"Command driven spotify player",N,
|
||||||
sshfs,"FUSE client based on the SSH File Transfer Protocol",N,
|
sshfs,"FUSE client based on the SSH File Transfer Protocol",N,
|
||||||
swayidle,"Idle management daemon for Wayland",N,
|
swayidle,"Idle management daemon for Wayland",N,
|
||||||
swaylock-effects,"Screen locker for Wayland with fancy effects",N,
|
swaylock-effects,"Screen locker for Wayland with fancy effects",N,
|
||||||
font-inconsolata,"Inconsolata fonts",N,
|
|
||||||
font-inconsolata-nerd,"Inconsolata Nerd Font",N,
|
font-inconsolata-nerd,"Inconsolata Nerd Font",N,
|
||||||
typst,"New markup-based typesetting system that is powerful and easy to learn",N,
|
typst,"New markup-based typesetting system that is powerful and easy to learn",N,
|
||||||
wayland,"A computer display server protocol",N,
|
wayland,"A computer display server protocol",N,
|
||||||
|
@ -57,7 +49,7 @@ xdg-desktop-portal-wlr,"wlroots implementation of xdg-desktop-portal",N,
|
||||||
xdg-user-dirs,"Manage user directories like ~/Desktop and ~/Music",N,
|
xdg-user-dirs,"Manage user directories like ~/Desktop and ~/Music",N,
|
||||||
xdg-utils,"Basic desktop integration functions",N,
|
xdg-utils,"Basic desktop integration functions",N,
|
||||||
zathura,"Highly customizable and functional document viewer",N,
|
zathura,"Highly customizable and functional document viewer",N,
|
||||||
zathura-pdf-poppler,"Poppler plugin adds PDF support to zathura",N,
|
zathura-pdf-mupdf,"mupdf plugin to zathura",N,
|
||||||
zsh,"Very advanced and programmable command interpreter (shell)",N,
|
zsh,"Very advanced and programmable command interpreter (shell)",N,
|
||||||
zsh-completions,"Additional completion definitions for Zsh (packaged as a plugin)",N,
|
zsh-completions,"Additional completion definitions for Zsh (packaged as a plugin)",N,
|
||||||
zsh-fast-syntax-highlighting,"Feature-rich syntax highlighting for ZSH",N,
|
zsh-fast-syntax-highlighting,"Feature-rich syntax highlighting for ZSH",N,
|
||||||
|
|
Can't render this file because it contains an unexpected character in line 8 and column 101.
|
Loading…
Add table
Add a link
Reference in a new issue