Removed reduncies

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-15 11:18:19 +02:00
parent 3ae8777075
commit df69b2ff6a
5 changed files with 22 additions and 22 deletions

View File

@ -68,7 +68,7 @@ if [ ! -f "$ssh_key_path" ]; then
fi fi
info "Installing nonfree drivers..." && info "Installing nonfree drivers..." &&
sudo mhwd -a pci nonfree 0300 || error "Failed." sudo mhwd -a pci nonfree 0300 || error
info "Setup, configuration and installation of dependencies for installed software..." info "Setup, configuration and installation of dependencies for installed software..."
@ -81,7 +81,7 @@ fi
if pacman -Qi "atom" > /dev/null ; then if pacman -Qi "atom" > /dev/null ; then
info "Installing atom dependencies..." info "Installing atom dependencies..."
info "Installing \"apm\" packages..." && info "Installing \"apm\" packages..." &&
get_packages "client/apm/general" | apm install --verbose -c - || error "Failed." get_packages "client/apm/general" | apm install --verbose -c - || error
info "Installing \"npm\" packages..." && info "Installing \"npm\" packages..." &&
sudo npm i -g bash-language-server && sudo npm i -g bash-language-server &&
info "Installing \"python\" packages..." && info "Installing \"python\" packages..." &&
@ -105,14 +105,14 @@ if [ ! "$(pacman -Qi "virtualbox")" ] ; then
pamac install virtualbox "$(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-virtualbox-host-modules"}' ORS=' ')" && pamac install virtualbox "$(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-virtualbox-host-modules"}' ORS=' ')" &&
sudo vboxreload && sudo vboxreload &&
pamac build virtualbox-ext-oracle && pamac build virtualbox-ext-oracle &&
sudo gpasswd -a "$USER" vboxusers || error "Failed." sudo gpasswd -a "$USER" vboxusers || error
info "Keep in mind to install the guest additions in the virtualized system. See https://wiki.manjaro.org/index.php?title=VirtualBox" info "Keep in mind to install the guest additions in the virtualized system. See https://wiki.manjaro.org/index.php?title=VirtualBox"
fi fi
if [ "$XDG_SESSION_TYPE" == "x11" ]; then if [ "$XDG_SESSION_TYPE" == "x11" ]; then
info "Synchronizing xserver tools..." && info "Synchronizing xserver tools..." &&
sudo pacman --needed -S xbindkeys && sudo pacman --needed -S xbindkeys &&
xbindkeys --poll-rc || error "Failed." xbindkeys --poll-rc || error
fi fi
install_gnome_extension(){ install_gnome_extension(){
@ -124,13 +124,13 @@ install_gnome_extension(){
then then
warning "Found a .git repository didn't expect to find this here." && warning "Found a .git repository didn't expect to find this here." &&
info "Pulling changes from git..." && info "Pulling changes from git..." &&
(cd "$extension_folder" && git pull) || error "Failed." (cd "$extension_folder" && git pull) || error
else else
info "No git repository. Extension will not be updated." info "No git repository. Extension will not be updated."
fi fi
else else
info "Install..." && info "Install..." &&
git clone "$2" "$extension_folder" || error "Failed." git clone "$2" "$extension_folder" || error
fi fi
if [ -f "$extension_folder""Makefile" ]; if [ -f "$extension_folder""Makefile" ];
@ -142,14 +142,14 @@ install_gnome_extension(){
(cd "$tmp_extension_folder" && make install) || error "Compilation with failed." (cd "$tmp_extension_folder" && make install) || error "Compilation with failed."
info "Cleaning up tmp-extension folder..."&& info "Cleaning up tmp-extension folder..."&&
rm -fr "$tmp_extension_folder" || error "Failed." rm -fr "$tmp_extension_folder" || error
else else
info "No Makefile found. Skipping compilation..." info "No Makefile found. Skipping compilation..."
fi fi
info "Activating GNOME extension \"$1\"..." && info "Activating GNOME extension \"$1\"..." &&
gnome-extensions enable "$1" || error "Failed." gnome-extensions enable "$1" || error
} }
if [ "$DESKTOP_SESSION" == "gnome" ]; then if [ "$DESKTOP_SESSION" == "gnome" ]; then
@ -168,13 +168,13 @@ if [ "$DESKTOP_SESSION" == "gnome" ]; then
'gimp.desktop', 'gimp.desktop',
'blender.desktop', 'blender.desktop',
'rhythmbox.desktop', 'rhythmbox.desktop',
'org.gnome.Screenshot.desktop']" || error "Failed." 'org.gnome.Screenshot.desktop']" || error
info "Install GNOME extensions..." && info "Install GNOME extensions..." &&
install_gnome_extension "nasa_apod@elinvention.ovh" "https://github.com/Elinvention/gnome-shell-extension-nasa-apod.git" install_gnome_extension "nasa_apod@elinvention.ovh" "https://github.com/Elinvention/gnome-shell-extension-nasa-apod.git"
install_gnome_extension "dash-to-panel@jderose9.github.com" "https://github.com/home-sweet-gnome/dash-to-panel" install_gnome_extension "dash-to-panel@jderose9.github.com" "https://github.com/home-sweet-gnome/dash-to-panel"
info "Deactivating \"Dash to Dock\"..." && info "Deactivating \"Dash to Dock\"..." &&
gnome-extensions disable dash-to-dock@micxgx.gmail.com || error "Failed." gnome-extensions disable dash-to-dock@micxgx.gmail.com || error
fi fi
@ -206,7 +206,7 @@ fi
info "Showing the installed Java versions..." && info "Showing the installed Java versions..." &&
archlinux-java status && archlinux-java status &&
info "Keep in mind to set the right Java-Version if it's neccessary." || info "Keep in mind to set the right Java-Version if it's neccessary." ||
error "Failed." error
info "Please restart the computer, so that all updates get applied." info "Please restart the computer, so that all updates get applied."
success "Setup finished successfully :)" && exit 0 success "Setup finished successfully :)" && exit 0

View File

@ -46,7 +46,7 @@ do
backup_dir=$(dirname "$CONCRETE_BACKUP_FOLDER/$system_item_path"); backup_dir=$(dirname "$CONCRETE_BACKUP_FOLDER/$system_item_path");
mkdir -p "$backup_dir" || error "Failed to create \"$backup_dir\"." mkdir -p "$backup_dir" || error "Failed to create \"$backup_dir\"."
info "Copy data from $source to $destination..." info "Copy data from $source to $destination..."
rsync -abcEPuvW --backup-dir="$backup_dir" "$source" "$destination" || error "Failed." rsync -abcEPuvW --backup-dir="$backup_dir" "$source" "$destination" || error
else else
if [ -d "$source" ] if [ -d "$source" ]
then then
@ -54,7 +54,7 @@ do
backup_dir="$CONCRETE_BACKUP_FOLDER/$system_item_path"; backup_dir="$CONCRETE_BACKUP_FOLDER/$system_item_path";
mkdir -p "$backup_dir" || error "Failed to create \"$backup_dir\"." mkdir -p "$backup_dir" || error "Failed to create \"$backup_dir\"."
info "Copy data from directory $source to directory $destination..." info "Copy data from directory $source to directory $destination..."
rsync -abcEPuvW --delete --backup-dir="$backup_dir" "$source" "$destination" || error "Failed." rsync -abcEPuvW --delete --backup-dir="$backup_dir" "$source" "$destination" || error
else else
warning "$source doesn't exist. Copying data is not possible." warning "$source doesn't exist. Copying data is not possible."
fi fi

View File

@ -11,4 +11,4 @@ fusermount -u "$DECRYPTED_PATH" || error "Unmounting failed."
info "Data is now encrypted." info "Data is now encrypted."
info "Removing directory $DECRYPTED_PATH..." && info "Removing directory $DECRYPTED_PATH..." &&
rmdir "$DECRYPTED_PATH" || error "Failed." rmdir "$DECRYPTED_PATH" || error

View File

@ -10,8 +10,8 @@ info "Unlocking directory $DECRYPTED_PATH..."
if [ ! -d "$DECRYPTED_PATH" ] if [ ! -d "$DECRYPTED_PATH" ]
then then
info "Creating directory $DECRYPTED_PATH..." && info "Creating directory $DECRYPTED_PATH..." &&
mkdir "$DECRYPTED_PATH" || error "Failed." mkdir "$DECRYPTED_PATH" || error
fi fi
info "Encrypting directory $DECRYPTED_PATH to $DECRYPTED_PATH..." && info "Encrypting directory $DECRYPTED_PATH to $DECRYPTED_PATH..." &&
encfs "$ENCRYPTED_PATH" "$DECRYPTED_PATH" || error "Failed." encfs "$ENCRYPTED_PATH" "$DECRYPTED_PATH" || error
echo "ATTENTION: DATA IS NOW DECRYPTED!" echo "ATTENTION: DATA IS NOW DECRYPTED!"

View File

@ -53,28 +53,28 @@ mount --bind /dev /mnt/raspbian/dev/ &&
mount --bind /sys /mnt/raspbian/sys/ && mount --bind /sys /mnt/raspbian/sys/ &&
mount --bind /proc /mnt/raspbian/proc/ && mount --bind /proc /mnt/raspbian/proc/ &&
mount --bind /dev/pts /mnt/raspbian/dev/pts || mount --bind /dev/pts /mnt/raspbian/dev/pts ||
error "Failed." error
info "ld.so.preload fix" && info "ld.so.preload fix" &&
sed -i 's/^/#CHROOT /g' /mnt/raspbian/etc/ld.so.preload || sed -i 's/^/#CHROOT /g' /mnt/raspbian/etc/ld.so.preload ||
error "Failed." error
info "copy qemu binary" && info "copy qemu binary" &&
cp -v /usr/bin/qemu-arm-static /mnt/raspbian/usr/bin/ || cp -v /usr/bin/qemu-arm-static /mnt/raspbian/usr/bin/ ||
error "Failed." error
info "You will be transferred to the bash shell now." && info "You will be transferred to the bash shell now." &&
info "Issue 'exit' when you are done." && info "Issue 'exit' when you are done." &&
info "Issue 'su pi' if you need to work as the user pi." && info "Issue 'su pi' if you need to work as the user pi." &&
info "chroot to raspbian" && info "chroot to raspbian" &&
chroot /mnt/raspbian /bin/bash || chroot /mnt/raspbian /bin/bash ||
error "Failed." error
info "Clean up" && info "Clean up" &&
info "revert ld.so.preload fix" && info "revert ld.so.preload fix" &&
sed -i 's/^#CHROOT //g' /mnt/raspbian/etc/ld.so.preload || sed -i 's/^#CHROOT //g' /mnt/raspbian/etc/ld.so.preload ||
error "Failed." error
info "unmount everything" && info "unmount everything" &&
umount /mnt/raspbian/{dev/pts,dev,sys,proc,boot,} || umount /mnt/raspbian/{dev/pts,dev,sys,proc,boot,} ||
error "Failed." error