Update
This commit is contained in:
parent
b7dfe686aa
commit
c72d663b54
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
do_setup() {
|
do_setup() {
|
||||||
keys=(
|
keys=(
|
||||||
'AEFB411B072836CD48FF0381AE252C284B5DBA5D'
|
AEFB411B072836CD48FF0381AE252C284B5DBA5D
|
||||||
'9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0'
|
9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0
|
||||||
'35F52A02854DCCAEC9DD5CC410443C7F54B00041'
|
35F52A02854DCCAEC9DD5CC410443C7F54B00041
|
||||||
)
|
)
|
||||||
sudo dirmngr </dev/null
|
sudo dirmngr </dev/null
|
||||||
sudo pacman-key --init
|
sudo pacman-key --init
|
||||||
@ -23,7 +23,7 @@ do_setup() {
|
|||||||
sudo pacman-key --populate archlabs
|
sudo pacman-key --populate archlabs
|
||||||
}
|
}
|
||||||
|
|
||||||
while ! ping -c1 8.8.8.8 &>/dev/null; do
|
while ! [[ "$(ping -c1 8.8.8.8)" ]]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
REPOS='
|
HOME_FILES=(
|
||||||
[archlabs_repo]
|
"$HOME/bin" "$HOME/.config" "$HOME/.themes"
|
||||||
Server = https://archlabs.github.io/archlabs_repo/$arch
|
|
||||||
Server = https://downloads.sourceforge.net/project/archlabs-repo/archlabs_repo/$arch'
|
|
||||||
|
|
||||||
HOME_FILES=("$HOME/bin" "$HOME/.config" "$HOME/.themes"
|
|
||||||
"$HOME/.gorice" "$HOME/.Xresources" "$HOME/.Xresources.template"
|
"$HOME/.gorice" "$HOME/.Xresources" "$HOME/.Xresources.template"
|
||||||
"$HOME/.mozilla" "$HOME/.zshrc" "$HOME/.bashrc"
|
"$HOME/.mozilla" "$HOME/.zshrc" "$HOME/.bashrc"
|
||||||
"$HOME/.local" "$HOME/.xprofile" "$HOME/.xinitrc"
|
"$HOME/.local" "$HOME/.xprofile" "$HOME/.xinitrc"
|
||||||
"$HOME/.icons" "$HOME/.gtkrc-2.0"
|
"$HOME/.icons" "$HOME/.gtkrc-2.0"
|
||||||
)
|
)
|
||||||
|
SKEL_FILES=(
|
||||||
SKEL_FILES=(/etc/skel/bin /etc/skel/.config /etc/skel/.themes
|
/etc/skel/bin /etc/skel/.config /etc/skel/.themes
|
||||||
/etc/skel/.Xresources /etc/skel/.gorice /etc/skel/.icons
|
/etc/skel/.Xresources /etc/skel/.gorice /etc/skel/.icons
|
||||||
/etc/skel/.gtkrc-2.0 /etc/skel/.xprofile /etc/skel/.xinitrc
|
/etc/skel/.gtkrc-2.0 /etc/skel/.xprofile /etc/skel/.xinitrc
|
||||||
/etc/skel/.mozilla /etc/skel/.Xresources.template
|
/etc/skel/.mozilla /etc/skel/.Xresources.template
|
||||||
)
|
)
|
||||||
|
|
||||||
# Loop until network connected
|
|
||||||
while ! [[ $(ping -c1 8.8.8.8) ]]; do
|
while ! [[ $(ping -c1 8.8.8.8) ]]; do
|
||||||
echo -e "Please Connect to a Network Before Continuing"
|
echo -e "Please Connect to a Network Before Continuing"
|
||||||
clear ; sleep 1
|
clear ; sleep 1
|
||||||
@ -30,14 +25,13 @@ backup_configs() {
|
|||||||
if ! [[ -e "$HOME/Downloads/$USER-backup.tar.gz" ]]; then
|
if ! [[ -e "$HOME/Downloads/$USER-backup.tar.gz" ]]; then
|
||||||
tar czvf "$HOME/Downloads/$USER-backup.tar.gz" "${HOME_FILES[@]}" >/dev/null 2>&1
|
tar czvf "$HOME/Downloads/$USER-backup.tar.gz" "${HOME_FILES[@]}" >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo "[WARNING] Backup already exists... Not overwriting"
|
echo "[INFO] Backup already exists... Not overwriting"
|
||||||
sleep 2
|
sleep 2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_configs() {
|
setup_configs() {
|
||||||
sudo pacman -S clutter-gtk libgee archlabs-jgmenu --needed --noconfirm
|
sudo pacman -S clutter-gtk libgee archlabs-jgmenu --needed --noconfirm
|
||||||
sudo pacman -S gdk-pixbuf2 pango python-yaml --needed --noconfirm
|
|
||||||
for f in "${SKEL_FILES[@]}"; do
|
for f in "${SKEL_FILES[@]}"; do
|
||||||
cp -rf "$f" ~/
|
cp -rf "$f" ~/
|
||||||
done
|
done
|
||||||
@ -46,9 +40,9 @@ setup_configs() {
|
|||||||
|
|
||||||
new_configs() {
|
new_configs() {
|
||||||
clear
|
clear
|
||||||
printf "\nThis step will get the latest configs for polybar, openbox, i3 etc.
|
echo -e "\nThis step will get the latest configs for polybar, openbox, i3 etc.
|
||||||
\n\nYour existing configs will be archived to:
|
\n\nYour existing configs will be archived to:\n\n\t$HOME/Downloads/$USER-backup.tar.gz\n\n\n"
|
||||||
\n\t$HOME/Downloads/$USER-backup.tar.gz\n\n\n\nDo you want to continue? [y/N]:"
|
printf "Do you want to continue? [y/N]: "
|
||||||
read -r answer
|
read -r answer
|
||||||
|
|
||||||
case "$answer" in
|
case "$answer" in
|
||||||
@ -57,13 +51,17 @@ new_configs() {
|
|||||||
if [[ -e $HOME/Downloads/$USER-backup.tar.gz ]]; then
|
if [[ -e $HOME/Downloads/$USER-backup.tar.gz ]]; then
|
||||||
setup_configs
|
setup_configs
|
||||||
fi
|
fi
|
||||||
|
if [[ -e $HOME/.config/keypack ]]; then
|
||||||
rm -f "$HOME/.config/keypack"
|
rm -f "$HOME/.config/keypack"
|
||||||
sed -i '/keypack/d' "$HOME/.config/openbox/autostart"
|
sed -i '/keypack/d' "$HOME/.config/openbox/autostart"
|
||||||
~/.config/setup
|
fi
|
||||||
|
if [[ -x $HOME/.config/setup ]]; then
|
||||||
|
"$HOME/.config/setup"
|
||||||
|
fi
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! pacman -Q archlabs-user-skel >/dev/null 2>&1; then
|
if ! pacman -Qsq archlabs-user-skel &>/dev/null; then
|
||||||
for f in "${SKEL_FILES[@]}"; do
|
for f in "${SKEL_FILES[@]}"; do
|
||||||
sudo rm -rf "$f"
|
sudo rm -rf "$f"
|
||||||
done
|
done
|
||||||
@ -71,7 +69,6 @@ if ! pacman -Q archlabs-user-skel >/dev/null 2>&1; then
|
|||||||
else
|
else
|
||||||
sudo pacman -Syyu --noconfirm
|
sudo pacman -Syyu --noconfirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_configs
|
new_configs
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
Reference in New Issue
Block a user