From 1e6ca0e4b024b59b186ef4be81b77bc8834b62e8 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:51:03 +0100 Subject: [PATCH 01/38] install all base dependencies at once in a function --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index e94aaa82..95c7c49f 100644 --- a/install.sh +++ b/install.sh @@ -11,11 +11,11 @@ #* # Update -sudo pacman -S archlinux-keyring -sudo pacman -Syu +install_base () { + sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo +} -# Install tools for building dependencies -sudo pacman -S git nushell cargo feh +install_base # Clone dotfiles git clone --bare https://github.com/goatfiles/dotfiles $HOME/.dotfiles From b1f35cc823349d3d9a85f3aa908ca94717d36d0a Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:55:31 +0100 Subject: [PATCH 02/38] curl config files and clone the dotfiles at the end --- install.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 95c7c49f..7848f257 100644 --- a/install.sh +++ b/install.sh @@ -10,19 +10,18 @@ #* ATXR: https://github.com/atxr atxr#6214 3B25AF716B608D41AB86C3D20E55E4B1DE5B2C8B #* -# Update install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo } -install_base -# Clone dotfiles -git clone --bare https://github.com/goatfiles/dotfiles $HOME/.dotfiles -cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" -$cfg reset --hard -$cfg config --local status.showUntrackedFiles no -$cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" +pull_files () { + curl -fLo /tmp/pkgs.toml https://raw.githubusercontent.com/goatfiles/dotfiles/main/pkgs.toml + curl -fLo /tmp/dmenu/patches.h https://raw.githubusercontent.com/goatfiles/dotfiles/main/.config/dmenu-flexipatch/patches.h +} + +install_base +pull_files # Clean and clone pkgbuilds if [[ -d /tmp/pkgbuilds ]]; then sudo rm -r /tmp/pkgbuilds; fi @@ -42,7 +41,7 @@ git clone https://github.com/goatfiles/pkgbuilds /tmp/pkgbuilds ) # Install dependencies -nu -c 'paru -S (open $"($env.HOME)/pkgs.toml" | get pkgs.pacman.explicit.package | find --invert --regex "amtoine|wallpapers")' +nu -c 'paru -S (open /tmp/pkgs.toml | get pkgs.pacman.explicit.package | find --invert --regex "amtoine|wallpapers")' # Install dmenu-flexipatch git clone https://github.com/bakkeby/dmenu-flexipatch /tmp/dmenu @@ -56,6 +55,13 @@ cp $HOME/.config/dmenu-flexipatch/patches.h /tmp/dmenu sudo systemctl enable sddm sudo systemctl enable NetworkManager +# Clone dotfiles +git clone --bare https://github.com/goatfiles/dotfiles $HOME/.dotfiles +cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" +$cfg reset --hard +$cfg config --local status.showUntrackedFiles no +$cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + # Greet echo 'Installation completed! Please reboot your computer.' From 9699a5a11480a308b6ec294f745b01e7ddaaf385 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:56:50 +0100 Subject: [PATCH 03/38] synchronize the database of `pacman` --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 7848f257..8a54cedd 100644 --- a/install.sh +++ b/install.sh @@ -15,12 +15,18 @@ install_base () { } +synchronize_database () { + sudo pacman -Fy +} + + pull_files () { curl -fLo /tmp/pkgs.toml https://raw.githubusercontent.com/goatfiles/dotfiles/main/pkgs.toml curl -fLo /tmp/dmenu/patches.h https://raw.githubusercontent.com/goatfiles/dotfiles/main/.config/dmenu-flexipatch/patches.h } install_base +synchronize_database pull_files # Clean and clone pkgbuilds From 737413ee0438e2364cb0aa46902f10db776b4fa8 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:57:30 +0100 Subject: [PATCH 04/38] fetch the dotfiles branches to have local copies --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 8a54cedd..f19e2c0a 100644 --- a/install.sh +++ b/install.sh @@ -67,6 +67,7 @@ cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" $cfg reset --hard $cfg config --local status.showUntrackedFiles no $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" +$cfg fetch # Greet echo 'Installation completed! Please reboot your computer.' From bdf2345d4e0a71b9a9d9ca5719634eeb20a4615a Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:58:27 +0100 Subject: [PATCH 05/38] clone the dotfiles in `GHQ_ROOT` --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f19e2c0a..d5d81ca0 100644 --- a/install.sh +++ b/install.sh @@ -62,7 +62,7 @@ sudo systemctl enable sddm sudo systemctl enable NetworkManager # Clone dotfiles -git clone --bare https://github.com/goatfiles/dotfiles $HOME/.dotfiles +git clone --bare https://github.com/goatfiles/dotfiles $HOME/.local/share/ghq/github.com/goatfiles/dotfiles cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" $cfg reset --hard $cfg config --local status.showUntrackedFiles no From 9d6cb560bead071301aa43f2d40a5e28f19bb90e Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:00:46 +0100 Subject: [PATCH 06/38] move PKGBUILDs inside a function and clean them --- install.sh | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index d5d81ca0..3629e2a7 100644 --- a/install.sh +++ b/install.sh @@ -25,26 +25,40 @@ pull_files () { curl -fLo /tmp/dmenu/patches.h https://raw.githubusercontent.com/goatfiles/dotfiles/main/.config/dmenu-flexipatch/patches.h } + +install_pkgbuilds () { + # Clean and clone pkgbuilds + [ -d /tmp/pkgbuilds ] && sudo rm -r /tmp/pkgbuilds + git clone https://github.com/goatfiles/pkgbuilds /tmp/pkgbuilds + + # Build pkgbuilds + ( + cd /tmp/pkgbuilds + ./install.sh x86_64/paru + ./clean.sh + ./install.sh x86_64/amtoine-scripts-git/ + ./clean.sh + ./install.sh x86_64/amtoine-sounds-git/ + ./clean.sh + ./install.sh x86_64/amtoine-wallpapers-git/ + ./clean.sh + ./install.sh x86_64/amtoine-applications-git/ + ./clean.sh + ./install.sh x86_64/amtoine-icons-git/ + ./clean.sh + ./install.sh x86_64/junnunkarim-wallpapers-git + ./clean.sh + ./install.sh x86_64/mut-ex-wallpapers-git + ) +} + + install_base synchronize_database -pull_files -# Clean and clone pkgbuilds -if [[ -d /tmp/pkgbuilds ]]; then sudo rm -r /tmp/pkgbuilds; fi -git clone https://github.com/goatfiles/pkgbuilds /tmp/pkgbuilds +pull_files -# Build pkgbuilds -( - cd /tmp/pkgbuilds - ./install.sh x86_64/paru - ./install.sh x86_64/amtoine-scripts-git/ - ./install.sh x86_64/amtoine-sounds-git/ - ./install.sh x86_64/amtoine-wallpapers-git/ - ./install.sh x86_64/amtoine-applications-git/ - ./install.sh x86_64/amtoine-icons-git/ - ./install.sh x86_64/junnunkarim-wallpapers-git - ./install.sh x86_64/mut-ex-wallpapers-git -) +install_pkgbuilds # Install dependencies nu -c 'paru -S (open /tmp/pkgs.toml | get pkgs.pacman.explicit.package | find --invert --regex "amtoine|wallpapers")' From b58c6ef41f460478c7b7fdea1ecbab8ba24a12eb Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:03:38 +0100 Subject: [PATCH 07/38] refactor the rest inside functions --- install.sh | 61 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/install.sh b/install.sh index 3629e2a7..eb011e61 100644 --- a/install.sh +++ b/install.sh @@ -53,36 +53,49 @@ install_pkgbuilds () { } +install_dependencies () { + nu -c 'paru -S (open /tmp/pkgs.toml | get pkgs.pacman.explicit.package | find --invert --regex "amtoine|wallpapers")' +} + + +install_dmenu () { + git clone https://github.com/bakkeby/dmenu-flexipatch /tmp/dmenu + cp $HOME/.config/dmenu-flexipatch/patches.h /tmp/dmenu + ( + cd /tmp/dmenu + sudo make clean install + ) +} + + +activate_system () { + sudo systemctl enable sddm + sudo systemctl enable NetworkManager +} + + +pull_dotfiles () { + git clone --bare https://github.com/goatfiles/dotfiles $HOME/.local/share/ghq/github.com/goatfiles/dotfiles + cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" + $cfg reset --hard + $cfg config --local status.showUntrackedFiles no + $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + $cfg fetch +} + + install_base synchronize_database pull_files install_pkgbuilds +install_dependencies +install_dmenu + +activate_system + +pull_dotfiles -# Install dependencies -nu -c 'paru -S (open /tmp/pkgs.toml | get pkgs.pacman.explicit.package | find --invert --regex "amtoine|wallpapers")' - -# Install dmenu-flexipatch -git clone https://github.com/bakkeby/dmenu-flexipatch /tmp/dmenu -cp $HOME/.config/dmenu-flexipatch/patches.h /tmp/dmenu -( - cd /tmp/dmenu - sudo make clean install -) - -# Activate useful system -sudo systemctl enable sddm -sudo systemctl enable NetworkManager - -# Clone dotfiles -git clone --bare https://github.com/goatfiles/dotfiles $HOME/.local/share/ghq/github.com/goatfiles/dotfiles -cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" -$cfg reset --hard -$cfg config --local status.showUntrackedFiles no -$cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" -$cfg fetch - -# Greet echo 'Installation completed! Please reboot your computer.' From ceeee658a20ed3a2edcb18c10c83fcdc607cd64b Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:06:20 +0100 Subject: [PATCH 08/38] add missing system activations --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index eb011e61..7a7a9aa6 100644 --- a/install.sh +++ b/install.sh @@ -71,6 +71,8 @@ install_dmenu () { activate_system () { sudo systemctl enable sddm sudo systemctl enable NetworkManager + sudo systemctl enable cronie + sudo systemctl enable bluetooth } From 6bf4098e0e43d941ae50df4a77d5600867483e4e Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:10:05 +0100 Subject: [PATCH 09/38] refactor the "raw" github URL into constants --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 7a7a9aa6..d0b591f1 100644 --- a/install.sh +++ b/install.sh @@ -10,6 +10,10 @@ #* ATXR: https://github.com/atxr atxr#6214 3B25AF716B608D41AB86C3D20E55E4B1DE5B2C8B #* +RAW_DOTFILES="https://raw.githubusercontent.com/goatfiles/dotfiles" +REVISION="main" + + install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo } @@ -19,10 +23,9 @@ synchronize_database () { sudo pacman -Fy } - pull_files () { - curl -fLo /tmp/pkgs.toml https://raw.githubusercontent.com/goatfiles/dotfiles/main/pkgs.toml - curl -fLo /tmp/dmenu/patches.h https://raw.githubusercontent.com/goatfiles/dotfiles/main/.config/dmenu-flexipatch/patches.h + curl -fLo /tmp/pkgs.toml "$RAW_DOTFILES/$REVISION/pkgs.toml" + curl -fLo /tmp/dmenu/patches.h "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" } From 14258389551bf5214ea937b440592dbd92fe6aac Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:13:49 +0100 Subject: [PATCH 10/38] refactor the paths for the pulled files in constants --- install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index d0b591f1..52dd9a17 100644 --- a/install.sh +++ b/install.sh @@ -13,6 +13,8 @@ RAW_DOTFILES="https://raw.githubusercontent.com/goatfiles/dotfiles" REVISION="main" +LOCAL_PKGS_FILE="/tmp/pkgs.toml" +LOCAL_DMENU_DIR="/tmp/dmenu" install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo @@ -24,8 +26,8 @@ synchronize_database () { } pull_files () { - curl -fLo /tmp/pkgs.toml "$RAW_DOTFILES/$REVISION/pkgs.toml" - curl -fLo /tmp/dmenu/patches.h "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" + curl -fLo "$LOCAL_PKGS_FILE" "$RAW_DOTFILES/$REVISION/pkgs.toml" + curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" } @@ -57,15 +59,14 @@ install_pkgbuilds () { install_dependencies () { - nu -c 'paru -S (open /tmp/pkgs.toml | get pkgs.pacman.explicit.package | find --invert --regex "amtoine|wallpapers")' + nu -c "paru -S (open $LOCAL_PKGS_FILE | get pkgs.pacman.explicit.package | find --invert --regex 'amtoine|wallpapers')" } install_dmenu () { - git clone https://github.com/bakkeby/dmenu-flexipatch /tmp/dmenu - cp $HOME/.config/dmenu-flexipatch/patches.h /tmp/dmenu + git clone https://github.com/bakkeby/dmenu-flexipatch "$LOCAL_DMENU_DIR" ( - cd /tmp/dmenu + cd "$LOCAL_DMENU_DIR" sudo make clean install ) } From 61178e56fb5aaf22bdfdb7708d9302d38dd50090 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:14:53 +0100 Subject: [PATCH 11/38] refactor the path to the dmenu repo --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 52dd9a17..4b00d38d 100644 --- a/install.sh +++ b/install.sh @@ -14,8 +14,11 @@ RAW_DOTFILES="https://raw.githubusercontent.com/goatfiles/dotfiles" REVISION="main" LOCAL_PKGS_FILE="/tmp/pkgs.toml" + +REMOTE_DMENU="https://github.com/bakkeby/dmenu-flexipatch" LOCAL_DMENU_DIR="/tmp/dmenu" + install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo } @@ -64,7 +67,7 @@ install_dependencies () { install_dmenu () { - git clone https://github.com/bakkeby/dmenu-flexipatch "$LOCAL_DMENU_DIR" + git clone "$REMOTE_DMENU" "$LOCAL_DMENU_DIR" ( cd "$LOCAL_DMENU_DIR" sudo make clean install From 8237dd734825a63507b17e9ea6a4813b08bdad29 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:18:02 +0100 Subject: [PATCH 12/38] refactor pkgbuilds paths and URLs into constants --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 4b00d38d..fcbecf77 100644 --- a/install.sh +++ b/install.sh @@ -18,6 +18,9 @@ LOCAL_PKGS_FILE="/tmp/pkgs.toml" REMOTE_DMENU="https://github.com/bakkeby/dmenu-flexipatch" LOCAL_DMENU_DIR="/tmp/dmenu" +REMOTE_PKGBUILDS="https://github.com/goatfiles/pkgbuilds" +LOCAL_PKGUILDS_DIR="/tmp/pkgbuilds" + install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo @@ -36,12 +39,12 @@ pull_files () { install_pkgbuilds () { # Clean and clone pkgbuilds - [ -d /tmp/pkgbuilds ] && sudo rm -r /tmp/pkgbuilds - git clone https://github.com/goatfiles/pkgbuilds /tmp/pkgbuilds + [ -d "$LOCAL_PKGBUILDS_DIR" ] && sudo rm -r "$LOCAL_PKGBUILDS_DIR" + git clone "$REMOTE_PKGBUILDS" "$LOCAL_PKGBUILDS_DIR" # Build pkgbuilds ( - cd /tmp/pkgbuilds + cd "$LOCAL_PKGBUILDS_DIR" ./install.sh x86_64/paru ./clean.sh ./install.sh x86_64/amtoine-scripts-git/ From d0c86160e4041a810c1629dfd2109ffb1fcf9b43 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:22:31 +0100 Subject: [PATCH 13/38] put the pkgbuilds in a list and iterate over them --- install.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/install.sh b/install.sh index fcbecf77..8ba37507 100644 --- a/install.sh +++ b/install.sh @@ -21,6 +21,17 @@ LOCAL_DMENU_DIR="/tmp/dmenu" REMOTE_PKGBUILDS="https://github.com/goatfiles/pkgbuilds" LOCAL_PKGUILDS_DIR="/tmp/pkgbuilds" +PKGBUILDS=( + paru + amtoine-scripts-git + amtoine-sounds-git + amtoine-wallpapers-git + amtoine-applications-git + amtoine-icons-git + junnunkarim-wallpapers-git + mut-ex-wallpapers-git +) + install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo @@ -45,21 +56,11 @@ install_pkgbuilds () { # Build pkgbuilds ( cd "$LOCAL_PKGBUILDS_DIR" - ./install.sh x86_64/paru - ./clean.sh - ./install.sh x86_64/amtoine-scripts-git/ - ./clean.sh - ./install.sh x86_64/amtoine-sounds-git/ - ./clean.sh - ./install.sh x86_64/amtoine-wallpapers-git/ - ./clean.sh - ./install.sh x86_64/amtoine-applications-git/ - ./clean.sh - ./install.sh x86_64/amtoine-icons-git/ - ./clean.sh - ./install.sh x86_64/junnunkarim-wallpapers-git + for pkgbuild in "${PKGBUILDS[@]}"; do + ./clean.sh + ./install.sh "x86_64/$pkgbuild/PKGBUILD" + done ./clean.sh - ./install.sh x86_64/mut-ex-wallpapers-git ) } From 4ac426058ebb859a7b6e52244d6c60437ca25fb6 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:24:28 +0100 Subject: [PATCH 14/38] refactor the system services in a list and iterate --- install.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 8ba37507..0d526212 100644 --- a/install.sh +++ b/install.sh @@ -33,6 +33,14 @@ PKGBUILDS=( ) +SYSTEM_SERVICES=( + sddm + NetworkManager + cronie + bluetooth +) + + install_base () { sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo } @@ -80,10 +88,9 @@ install_dmenu () { activate_system () { - sudo systemctl enable sddm - sudo systemctl enable NetworkManager - sudo systemctl enable cronie - sudo systemctl enable bluetooth + for service in "${SYSTEM_SERVICES[@]}"; do + sudo systemctl enable "$service" + done } From 0f6726d97749dd2aa977bbe06ddccaf93d907ff6 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:26:30 +0100 Subject: [PATCH 15/38] refactor the base dependencies in a list as well --- install.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 0d526212..e0761ccb 100644 --- a/install.sh +++ b/install.sh @@ -10,6 +10,16 @@ #* ATXR: https://github.com/atxr atxr#6214 3B25AF716B608D41AB86C3D20E55E4B1DE5B2C8B #* + +BASE_DEPENDENCIES=( + archlinux-keyring + base-devel + git + vim + nushell + cargo +) + RAW_DOTFILES="https://raw.githubusercontent.com/goatfiles/dotfiles" REVISION="main" @@ -32,7 +42,6 @@ PKGBUILDS=( mut-ex-wallpapers-git ) - SYSTEM_SERVICES=( sddm NetworkManager @@ -42,7 +51,7 @@ SYSTEM_SERVICES=( install_base () { - sudo pacman --noconfirm -Syyu archlinux-keyring base-devel git vim nushell cargo + sudo pacman --noconfirm -Syyu "${BASE_DEPENDENCIES[@]}" } From 8c0812a97f4b1d64e4c8a192789fb0f381bc6020 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:28:52 +0100 Subject: [PATCH 16/38] refactor the path to the dotfiles in constants --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e0761ccb..857d585e 100644 --- a/install.sh +++ b/install.sh @@ -49,6 +49,9 @@ SYSTEM_SERVICES=( bluetooth ) +REMOTE_DOTFILES="https://github.com/goatfiles/dotfiles" +LOCAL_DOTFILES_DIR="$HOME/.local/share/ghq/github.com/goatfiles/dotfiles" + install_base () { sudo pacman --noconfirm -Syyu "${BASE_DEPENDENCIES[@]}" @@ -104,8 +107,8 @@ activate_system () { pull_dotfiles () { - git clone --bare https://github.com/goatfiles/dotfiles $HOME/.local/share/ghq/github.com/goatfiles/dotfiles - cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" + git clone --bare "$REMOTE_DOTFILES" "$LOCAL_DOTFILES_DIR" + cfg="/usr/bin/git --git-dir=$LOCAL_DOTFILES_DIR --work-tree=$HOME" $cfg reset --hard $cfg config --local status.showUntrackedFiles no $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" From e46bb216444fa3dabb9e83ae792f2f2d9b56577e Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Sun, 18 Dec 2022 23:34:46 +0100 Subject: [PATCH 17/38] install pacman, rust and python dependencies --- install.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 857d585e..66aab357 100644 --- a/install.sh +++ b/install.sh @@ -86,7 +86,23 @@ install_pkgbuilds () { install_dependencies () { - nu -c "paru -S (open $LOCAL_PKGS_FILE | get pkgs.pacman.explicit.package | find --invert --regex 'amtoine|wallpapers')" + pacman_deps=$(nu -c "\ + open $LOCAL_PKGS_FILE \ + | get pkgs.pacman.explicit.package \ + | find --invert --regex 'amtoine|wallpapers'\ + ") + rust_deps=$(nu -c "\ + open $LOCAL_PKGS_FILE \ + | get pkgs.rust.cargo.package \ + ") + python_deps=$(nu -c "\ + open $LOCAL_PKGS_FILE \ + | get pkgs.python.pip.package \ + ") + + paru -S $pacman_deps + cargo install $rust_deps + pip install $python_deps } From 842a8da993231744e54e780fdd8e3bf3ed140da6 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:07:57 +0100 Subject: [PATCH 18/38] fix a typo in the name of the constants --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 66aab357..67e7cf9a 100644 --- a/install.sh +++ b/install.sh @@ -29,7 +29,7 @@ REMOTE_DMENU="https://github.com/bakkeby/dmenu-flexipatch" LOCAL_DMENU_DIR="/tmp/dmenu" REMOTE_PKGBUILDS="https://github.com/goatfiles/pkgbuilds" -LOCAL_PKGUILDS_DIR="/tmp/pkgbuilds" +LOCAL_PKGBUILDS_DIR="/tmp/pkgbuilds" PKGBUILDS=( paru From 269df7752cc0d4f6b2aca33c15fe08729d80dca8 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:14:14 +0100 Subject: [PATCH 19/38] fix the name of pkgbuilds' "clean" script --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 67e7cf9a..47472a5f 100644 --- a/install.sh +++ b/install.sh @@ -77,10 +77,10 @@ install_pkgbuilds () { ( cd "$LOCAL_PKGBUILDS_DIR" for pkgbuild in "${PKGBUILDS[@]}"; do - ./clean.sh + ./cleanup.sh ./install.sh "x86_64/$pkgbuild/PKGBUILD" done - ./clean.sh + ./cleanup.sh ) } From 24a1b0f1a85ae7d7ed9a1fa09d212f50810d12b7 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:15:19 +0100 Subject: [PATCH 20/38] pull the files in the functions directly --- install.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 47472a5f..5993087c 100644 --- a/install.sh +++ b/install.sh @@ -62,11 +62,6 @@ synchronize_database () { sudo pacman -Fy } -pull_files () { - curl -fLo "$LOCAL_PKGS_FILE" "$RAW_DOTFILES/$REVISION/pkgs.toml" - curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" -} - install_pkgbuilds () { # Clean and clone pkgbuilds @@ -86,6 +81,8 @@ install_pkgbuilds () { install_dependencies () { + curl -fLo "$LOCAL_PKGS_FILE" "$RAW_DOTFILES/$REVISION/pkgs.toml" + pacman_deps=$(nu -c "\ open $LOCAL_PKGS_FILE \ | get pkgs.pacman.explicit.package \ @@ -108,6 +105,9 @@ install_dependencies () { install_dmenu () { git clone "$REMOTE_DMENU" "$LOCAL_DMENU_DIR" + + curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" + ( cd "$LOCAL_DMENU_DIR" sudo make clean install @@ -135,8 +135,6 @@ pull_dotfiles () { install_base synchronize_database -pull_files - install_pkgbuilds install_dependencies install_dmenu From 31a8bdca41c793021cc4c96344793c96c7b094cc Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:16:05 +0100 Subject: [PATCH 21/38] remove `dmenu`'s local copy if already there --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 5993087c..27118e1a 100644 --- a/install.sh +++ b/install.sh @@ -104,6 +104,7 @@ install_dependencies () { install_dmenu () { + [ -d "$LOCAL_DMENU_DIR" ] && sudo rm -r "$LOCAL_DMENU_DIR" git clone "$REMOTE_DMENU" "$LOCAL_DMENU_DIR" curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" From f25476e190bf18177ae44f59dcc37c9ec8226362 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:15:57 +0100 Subject: [PATCH 22/38] install the system files --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 27118e1a..9ba29608 100644 --- a/install.sh +++ b/install.sh @@ -42,6 +42,14 @@ PKGBUILDS=( mut-ex-wallpapers-git ) +SYSTEM_FILES=( + etc/pacman.conf + etc/pacman.d/mirrorlist + etc/sddm.conf + usr/share/sddm/themes/sugar-candy/theme.conf + var/spool/cron/user +) + SYSTEM_SERVICES=( sddm NetworkManager @@ -116,6 +124,13 @@ install_dmenu () { } +install_system_files () { + for file in "${SYSTEM_FILES[@]}"; do + sudo curl -fLo "/$file" "$RAW_DOTFILES/$REVISION/.system/$file" + done +} + + activate_system () { for service in "${SYSTEM_SERVICES[@]}"; do sudo systemctl enable "$service" @@ -140,6 +155,7 @@ install_pkgbuilds install_dependencies install_dmenu +install_system_files activate_system pull_dotfiles From 3c1c63fcdb9c7184983ec2b68f2cb9bec12edff9 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:16:59 +0100 Subject: [PATCH 23/38] checkout onto `REVISION` at the end --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 9ba29608..38f5bd65 100644 --- a/install.sh +++ b/install.sh @@ -145,6 +145,7 @@ pull_dotfiles () { $cfg config --local status.showUntrackedFiles no $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" $cfg fetch + $cfg checkout "$REVISION" } From 32c939ed18779f89eaf49243df5909894b2171a1 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:32:36 +0100 Subject: [PATCH 24/38] echo_and_run all the commands --- install.sh | 59 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/install.sh b/install.sh index 38f5bd65..938fab9a 100644 --- a/install.sh +++ b/install.sh @@ -61,35 +61,42 @@ REMOTE_DOTFILES="https://github.com/goatfiles/dotfiles" LOCAL_DOTFILES_DIR="$HOME/.local/share/ghq/github.com/goatfiles/dotfiles" +echo_and_run () { + echo -e "\e[93m===============================================\e[0m" + echo -e "\e[93m$@\e[0m" + eval "$@" +} + + install_base () { - sudo pacman --noconfirm -Syyu "${BASE_DEPENDENCIES[@]}" + echo_and_run sudo pacman --noconfirm -Syyu "${BASE_DEPENDENCIES[@]}" } synchronize_database () { - sudo pacman -Fy + echo_and_run sudo pacman -Fy } install_pkgbuilds () { # Clean and clone pkgbuilds - [ -d "$LOCAL_PKGBUILDS_DIR" ] && sudo rm -r "$LOCAL_PKGBUILDS_DIR" - git clone "$REMOTE_PKGBUILDS" "$LOCAL_PKGBUILDS_DIR" + [ -d "$LOCAL_PKGBUILDS_DIR" ] && echo_and_run sudo rm -r "$LOCAL_PKGBUILDS_DIR" + echo_and_run git clone "$REMOTE_PKGBUILDS" "$LOCAL_PKGBUILDS_DIR" # Build pkgbuilds ( - cd "$LOCAL_PKGBUILDS_DIR" + echo_and_run cd "$LOCAL_PKGBUILDS_DIR" for pkgbuild in "${PKGBUILDS[@]}"; do - ./cleanup.sh - ./install.sh "x86_64/$pkgbuild/PKGBUILD" + echo_and_run ./cleanup.sh + echo_and_run ./install.sh "x86_64/$pkgbuild/PKGBUILD" done - ./cleanup.sh + echo_and_run ./cleanup.sh ) } install_dependencies () { - curl -fLo "$LOCAL_PKGS_FILE" "$RAW_DOTFILES/$REVISION/pkgs.toml" + echo_and_run curl -fLo "$LOCAL_PKGS_FILE" "$RAW_DOTFILES/$REVISION/pkgs.toml" pacman_deps=$(nu -c "\ open $LOCAL_PKGS_FILE \ @@ -105,47 +112,47 @@ install_dependencies () { | get pkgs.python.pip.package \ ") - paru -S $pacman_deps - cargo install $rust_deps - pip install $python_deps + echo_and_run paru -S $pacman_deps + echo_and_run cargo install $rust_deps + echo_and_run pip install $python_deps } install_dmenu () { - [ -d "$LOCAL_DMENU_DIR" ] && sudo rm -r "$LOCAL_DMENU_DIR" - git clone "$REMOTE_DMENU" "$LOCAL_DMENU_DIR" + [ -d "$LOCAL_DMENU_DIR" ] && echo_and_run sudo rm -r "$LOCAL_DMENU_DIR" + echo_and_run git clone "$REMOTE_DMENU" "$LOCAL_DMENU_DIR" - curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" + echo_and_run curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" ( - cd "$LOCAL_DMENU_DIR" - sudo make clean install + echo_and_run cd "$LOCAL_DMENU_DIR" + echo_and_run sudo make clean install ) } install_system_files () { for file in "${SYSTEM_FILES[@]}"; do - sudo curl -fLo "/$file" "$RAW_DOTFILES/$REVISION/.system/$file" + echo_and_run sudo curl -fLo "/$file" "$RAW_DOTFILES/$REVISION/.system/$file" done } activate_system () { for service in "${SYSTEM_SERVICES[@]}"; do - sudo systemctl enable "$service" + echo_and_run sudo systemctl enable "$service" done } pull_dotfiles () { - git clone --bare "$REMOTE_DOTFILES" "$LOCAL_DOTFILES_DIR" - cfg="/usr/bin/git --git-dir=$LOCAL_DOTFILES_DIR --work-tree=$HOME" - $cfg reset --hard - $cfg config --local status.showUntrackedFiles no - $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - $cfg fetch - $cfg checkout "$REVISION" + echo_and_run git clone --bare "$REMOTE_DOTFILES" "$LOCAL_DOTFILES_DIR" + echo_and_run cfg="/usr/bin/git --git-dir=$LOCAL_DOTFILES_DIR --work-tree=$HOME" + echo_and_run $cfg reset --hard + echo_and_run $cfg config --local status.showUntrackedFiles no + echo_and_run $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + echo_and_run $cfg fetch + echo_and_run $cfg checkout "$REVISION" } From b705e84f62545750a0ee43cf3a4a3aa992cc1dac Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:35:51 +0100 Subject: [PATCH 25/38] exit if a command fails --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 938fab9a..4157e9d6 100644 --- a/install.sh +++ b/install.sh @@ -65,6 +65,12 @@ echo_and_run () { echo -e "\e[93m===============================================\e[0m" echo -e "\e[93m$@\e[0m" eval "$@" + + if [ "$?" -ne 0 ]; then + echo -e "\e[91m===============================================\e[0m" + echo -e "\e[91man error occured!!\e[0m" + exit 1 + fi } From 22ed77bee34b02462f53b989ed5cdfd7e03e992a Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:41:25 +0100 Subject: [PATCH 26/38] do not forget to exit the subshells --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 4157e9d6..1a54e303 100644 --- a/install.sh +++ b/install.sh @@ -64,13 +64,13 @@ LOCAL_DOTFILES_DIR="$HOME/.local/share/ghq/github.com/goatfiles/dotfiles" echo_and_run () { echo -e "\e[93m===============================================\e[0m" echo -e "\e[93m$@\e[0m" - eval "$@" - if [ "$?" -ne 0 ]; then + eval "$@" || { echo -e "\e[91m===============================================\e[0m" echo -e "\e[91man error occured!!\e[0m" + echo -e "\e[91m'$@' failed...\e[0m" exit 1 - fi + } } @@ -97,7 +97,7 @@ install_pkgbuilds () { echo_and_run ./install.sh "x86_64/$pkgbuild/PKGBUILD" done echo_and_run ./cleanup.sh - ) + ) || exit 1 } @@ -133,7 +133,7 @@ install_dmenu () { ( echo_and_run cd "$LOCAL_DMENU_DIR" echo_and_run sudo make clean install - ) + ) || exit 1 } From 4b7309570d7297d9e26625c34e35b05c75aa7632 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:43:41 +0100 Subject: [PATCH 27/38] add better "echo" messages --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 1a54e303..8b7a0bdf 100644 --- a/install.sh +++ b/install.sh @@ -62,13 +62,13 @@ LOCAL_DOTFILES_DIR="$HOME/.local/share/ghq/github.com/goatfiles/dotfiles" echo_and_run () { - echo -e "\e[93m===============================================\e[0m" + echo -e "\e[93m== running following command ==================\e[0m" echo -e "\e[93m$@\e[0m" eval "$@" || { - echo -e "\e[91m===============================================\e[0m" - echo -e "\e[91man error occured!!\e[0m" + echo -e "\e[91m== an error occured... terminating... =========\e[0m" echo -e "\e[91m'$@' failed...\e[0m" + echo -e "\e[91mcurrent pwd: $(pwd)\e[0m" exit 1 } } From e64e8ef27f395d33057c20db3738c62f696fdf18 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:50:45 +0100 Subject: [PATCH 28/38] add some colors to the end message --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8b7a0bdf..1db9473a 100644 --- a/install.sh +++ b/install.sh @@ -174,5 +174,5 @@ activate_system pull_dotfiles -echo 'Installation completed! Please reboot your computer.' +echo -e "\e[92mInstallation completed! Please reboot your computer\e[0m." From e4da24a1ed1f7ec0d8b69a5357277e93662efd01 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:59:12 +0100 Subject: [PATCH 29/38] do not ask confirmation for PKGBUILDs and dmenu --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1db9473a..00b2937f 100644 --- a/install.sh +++ b/install.sh @@ -94,7 +94,7 @@ install_pkgbuilds () { echo_and_run cd "$LOCAL_PKGBUILDS_DIR" for pkgbuild in "${PKGBUILDS[@]}"; do echo_and_run ./cleanup.sh - echo_and_run ./install.sh "x86_64/$pkgbuild/PKGBUILD" + yes | echo_and_run ./install.sh "x86_64/$pkgbuild/PKGBUILD" done echo_and_run ./cleanup.sh ) || exit 1 @@ -132,7 +132,7 @@ install_dmenu () { ( echo_and_run cd "$LOCAL_DMENU_DIR" - echo_and_run sudo make clean install + yes | echo_and_run sudo make clean install ) || exit 1 } From c98aedab88f2eef6ce81201297694718ca968aac Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:59:30 +0100 Subject: [PATCH 30/38] make directories before `curl`ing system files --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 00b2937f..bcac07e3 100644 --- a/install.sh +++ b/install.sh @@ -139,6 +139,7 @@ install_dmenu () { install_system_files () { for file in "${SYSTEM_FILES[@]}"; do + echo_and_run sudo mkdir -p "/$(dirname "$file")" echo_and_run sudo curl -fLo "/$file" "$RAW_DOTFILES/$REVISION/.system/$file" done } From 53d25b27e917450d14474c058d436258c6ed8d88 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:13:10 +0100 Subject: [PATCH 31/38] fix the exit from subshell --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index bcac07e3..362ffe7a 100644 --- a/install.sh +++ b/install.sh @@ -94,10 +94,10 @@ install_pkgbuilds () { echo_and_run cd "$LOCAL_PKGBUILDS_DIR" for pkgbuild in "${PKGBUILDS[@]}"; do echo_and_run ./cleanup.sh - yes | echo_and_run ./install.sh "x86_64/$pkgbuild/PKGBUILD" + yes | echo_and_run ./install.sh "x86_64/$pkgbuild/PKGBUILD" || exit 1 done echo_and_run ./cleanup.sh - ) || exit 1 + ) } @@ -132,8 +132,8 @@ install_dmenu () { ( echo_and_run cd "$LOCAL_DMENU_DIR" - yes | echo_and_run sudo make clean install - ) || exit 1 + yes | echo_and_run sudo make clean install || exit 1 + ) } From 6719df17d290afd0389245b74fdaee007f3c75b0 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:43:00 +0100 Subject: [PATCH 32/38] fix the blacklist in `pacman` packages --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 362ffe7a..172749ef 100644 --- a/install.sh +++ b/install.sh @@ -107,7 +107,7 @@ install_dependencies () { pacman_deps=$(nu -c "\ open $LOCAL_PKGS_FILE \ | get pkgs.pacman.explicit.package \ - | find --invert --regex 'amtoine|wallpapers'\ + | find --invert --regex 'goat-.*-git'\ ") rust_deps=$(nu -c "\ open $LOCAL_PKGS_FILE \ From c50fd5dc6df0c5079b7b58198ae8816cb0b27f86 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:01:26 +0100 Subject: [PATCH 33/38] remove `dtos-core-repo` from `pacman`, it is broken --- .system/etc/pacman.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.system/etc/pacman.conf b/.system/etc/pacman.conf index c9f789f9..f26474b4 100644 --- a/.system/etc/pacman.conf +++ b/.system/etc/pacman.conf @@ -111,7 +111,3 @@ Include = /etc/pacman.d/mirrorlist #[custom] #SigLevel = Optional TrustAll #Server = file:///home/custompkgs - -[dtos-core-repo] -SigLevel = Required DatabaseOptional -Server = https://gitlab.com/dtos/$repo/-/raw/main/$arch From d07c75bbb60722a74f6e8e56f90343bf81888289 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:04:58 +0100 Subject: [PATCH 34/38] install dependencies manually for now --- install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 172749ef..944d317f 100644 --- a/install.sh +++ b/install.sh @@ -18,6 +18,16 @@ BASE_DEPENDENCIES=( vim nushell cargo + sddm + bspwm + sxhkd + alacritty + cronie + blueman + bluez + bluez-utils + bluez-libs + bluez-plugins ) RAW_DOTFILES="https://raw.githubusercontent.com/goatfiles/dotfiles" @@ -167,7 +177,7 @@ install_base synchronize_database install_pkgbuilds -install_dependencies +#install_dependencies install_dmenu install_system_files From 1bcc2e09615eaf608eb4452ffd844a51e5243fe9 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:17:08 +0100 Subject: [PATCH 35/38] do not forget to exit out from the subshells --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 944d317f..b4a63f00 100644 --- a/install.sh +++ b/install.sh @@ -108,6 +108,7 @@ install_pkgbuilds () { done echo_and_run ./cleanup.sh ) + [ "$?" -ne 0 ] && exit 1 } @@ -144,6 +145,7 @@ install_dmenu () { echo_and_run cd "$LOCAL_DMENU_DIR" yes | echo_and_run sudo make clean install || exit 1 ) + [ "$?" -ne 0 ] && exit 1 } From 5a3715abb8af303592c750c71e729909784fb667 Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:20:15 +0100 Subject: [PATCH 36/38] Revert "remove `dtos-core-repo` from `pacman`, it is broken" This reverts commit c50fd5dc6df0c5079b7b58198ae8816cb0b27f86. This has been taken care of in #70. --- .system/etc/pacman.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.system/etc/pacman.conf b/.system/etc/pacman.conf index f26474b4..c9f789f9 100644 --- a/.system/etc/pacman.conf +++ b/.system/etc/pacman.conf @@ -111,3 +111,7 @@ Include = /etc/pacman.d/mirrorlist #[custom] #SigLevel = Optional TrustAll #Server = file:///home/custompkgs + +[dtos-core-repo] +SigLevel = Required DatabaseOptional +Server = https://gitlab.com/dtos/$repo/-/raw/main/$arch From b7fc1472438cc8040dbde6c604bc0e243e6a98dd Mon Sep 17 00:00:00 2001 From: amtoine <44101798+amtoine@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:26:04 +0100 Subject: [PATCH 37/38] do not try to echo_and_run the cfg alias --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b4a63f00..b4c9ce03 100644 --- a/install.sh +++ b/install.sh @@ -166,7 +166,7 @@ activate_system () { pull_dotfiles () { echo_and_run git clone --bare "$REMOTE_DOTFILES" "$LOCAL_DOTFILES_DIR" - echo_and_run cfg="/usr/bin/git --git-dir=$LOCAL_DOTFILES_DIR --work-tree=$HOME" + cfg="/usr/bin/git --git-dir=$LOCAL_DOTFILES_DIR --work-tree=$HOME" echo_and_run $cfg reset --hard echo_and_run $cfg config --local status.showUntrackedFiles no echo_and_run $cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" From 251598935a2a29868bc975372a5af88b99a051e2 Mon Sep 17 00:00:00 2001 From: amtoine Date: Thu, 19 Jan 2023 22:06:40 +0100 Subject: [PATCH 38/38] fix the URLs to download actual files, not HTML --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 7bf3ba2e..efdaff42 100644 --- a/install.sh +++ b/install.sh @@ -30,7 +30,7 @@ BASE_DEPENDENCIES=( bluez-plugins ) -RAW_DOTFILES="https://raw.githubusercontent.com/goatfiles/dotfiles" +RAW_GOATFILES="https://raw.githubusercontent.com/goatfiles" REVISION="main" LOCAL_PKGS_FILE="/tmp/pkgs.toml" @@ -113,7 +113,7 @@ install_pkgbuilds () { install_dependencies () { - echo_and_run curl -fLo "$LOCAL_PKGS_FILE" "$RAW_DOTFILES/$REVISION/pkgs.toml" + echo_and_run curl -fLo "$LOCAL_PKGS_FILE" "$RAW_GOATFILES/dotfiles/$REVISION/pkgs.toml" pacman_deps=$(nu -c "\ open $LOCAL_PKGS_FILE \ @@ -139,7 +139,7 @@ install_dmenu () { [ -d "$LOCAL_DMENU_DIR" ] && echo_and_run sudo rm -r "$LOCAL_DMENU_DIR" echo_and_run git clone "$REMOTE_DMENU" "$LOCAL_DMENU_DIR" - echo_and_run curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_DOTFILES/$REVISION/.config/dmenu-flexipatch/patches.h" + echo_and_run curl -fLo "$LOCAL_DMENU_DIR/patches.h" "$RAW_GOATFILES/dotfiles/$REVISION/.config/dmenu-flexipatch/patches.h" ( echo_and_run cd "$LOCAL_DMENU_DIR" @@ -152,7 +152,7 @@ install_dmenu () { install_system_files () { for file in "${SYSTEM_FILES[@]}"; do echo_and_run sudo mkdir -p "/$(dirname "$file")" - echo_and_run sudo curl -fLo "/$file" "$RAW_DOTFILES/$REVISION/.system/$file" + echo_and_run sudo curl -fLo "/$file" "$RAW_GOATFILES/system/$REVISION/$file" done }