summaryrefslogtreecommitdiff
path: root/zirless.sh
diff options
context:
space:
mode:
Diffstat (limited to 'zirless.sh')
-rw-r--r--zirless.sh31
1 files changed, 16 insertions, 15 deletions
diff --git a/zirless.sh b/zirless.sh
index 5cb800d..cf0fba0 100644
--- a/zirless.sh
+++ b/zirless.sh
@@ -120,7 +120,10 @@ Include = /etc/pacman.d/mirrorlist-arch
Include = /etc/pacman.d/mirrorlist-arch
[multilib]
-Include = /etc/pacman.d/mirrorlist-arch" \
+Include = /etc/pacman.d/mirrorlist-arch
+" >> /etc/pacman.conf >/dev/null 2>&1
+ pacman -Syy
+ pacman-key --refresh-keys ;}
>> /etc/pacman.conf 2>/dev/null ;}
manualinstall() { # Installs $1 manually if not installed. Used only for AUR helper here.
@@ -165,12 +168,6 @@ aurinstall() { \
$rootcmd -u "$name" $aurhelper -S --noconfirm "$1" >/dev/null 2>&1
}
-pipinstall() { \
- dialog --title "ZIRLESS Installation" --infobox "Installing the Python package \`$1\` ($n of $total). $1 $2" 5 70
- [ -x "$(command -v "pip")" ] || installpkg python-pip >/dev/null 2>&1
- yes | pip install "$1"
- }
-
installationloop() { \
([ -f "$progsfile" ] && cp "$progsfile" /tmp/progs.csv) || curl -Ls "$progsfile" | sed '/^#/d' > /tmp/progs.csv
total=$(wc -l < /tmp/progs.csv)
@@ -182,7 +179,6 @@ installationloop() { \
"A") aurinstall "$program" "$comment" ;;
"G") gitmakeinstall "$program" "$comment" ;;
"M") gitmakepkginstall "$program" "$comment" ;;
- "P") pipinstall "$program" "$comment" ;;
*) maininstall "$program" "$comment" ;;
esac
done < /tmp/progs.csv ;}
@@ -192,9 +188,12 @@ putgitrepo() { # Downloads a gitrepo $1 and places the files in $2 only overwrit
[ -z "$3" ] && branch="master" || branch="$repobranch"
dir=$(mktemp -d)
[ ! -d "$2" ] && mkdir -p "$2"
- chown "$name":wheel "$dir" "$2"
- $rootcmd -u "$name" git clone --recursive -b "$branch" --depth 1 --recurse-submodules "$1" "$dir" >/dev/null 2>&1
- $rootcmd -u "$name" cp -rfT "$dir" "$2"
+ chown "$name":"$name" "$dir" "$2"
+ sudo -u "$name" git clone --recursive -b "$branch" --depth 1 --recurse-submodules "$1" "$dir" >/dev/null 2>&1
+ sudo -u "$name" cp -rfT "$dir" "$2"
+ pushd "$2"
+ sudo -u "$name" make install
+ popd
}
systembeepoff() { dialog --infobox "Getting rid of that retarded error beep sound..." 10 50
@@ -246,9 +245,11 @@ adduserandpass || error "Error adding username and/or password."
# in a fakeroot environment, this is required for all builds with AUR.
newperms "allnopass"
-# Make pacman and paru colorful and adds eye candy on the progress bar because why not.
-grep -q "^Color" /etc/pacman.conf || sed -i "s/^#Color$/Color/" /etc/pacman.conf
-grep -q "ILoveCandy" /etc/pacman.conf || sed -i "/#VerbosePkgLists/a #ILoveCandy" /etc/pacman.conf
+# Make pacman and paru colorful but turns off ilovecandy on the progress bar.
+grep -q "^Color" /etc/pacman.conf || sed -i "s/^#Color$/Color/" /etc/pacman.conf ||
+ sed -i "/UseSyslog/a Color" /etc/pacman.conf
+grep -q "^ILoveCandy" /etc/pacman.conf && sed -i "s/^ILoveCandy/#ILoveCandy" /etc/pacman.conf
+grep -q "^#ParallelDownloads" /etc/pacman.conf && sed -i "s/^#ParallelDownloads/ParallelDownloads/" /etc/pacman.conf
# Use all cores for compilation.
sed -i "s/-j2/-j$(nproc)/;s/^#MAKEFLAGS/MAKEFLAGS/" /etc/makepkg.conf
@@ -267,7 +268,7 @@ dialog --title "ZIRLESS Installation" --infobox "Finally, installing \`libxft-bg
yes | $rootcmd -u "$name" $aurhelper -S libxft-bgra-git >/dev/null 2>&1
# Install the dotfiles in the user's home directory
-putgitrepo "$dotfilesrepo" "/home/$name" "$repobranch"
+putgitrepo "$dotfilesrepo" "/home/$name/.config" "$repobranch"
rm -f "/home/$name/README.md" "/home/$name/LICENSE" "/home/$name/FUNDING.yml"
# Create default urls file if none exists.
[ ! -f "/home/$name/.config/newsboat/urls" ] && echo "http://lukesmith.xyz/rss.xml