first working version, I think
This commit is contained in:
parent
5ceab93dd5
commit
ad609ce24b
@ -14,13 +14,11 @@ This project is an effort to create a easy to use system to install a fresh vers
|
|||||||
|
|
||||||
I want this to be able to be used on a fresh arch install with 0 dependencies, so, I will need to make sure that the user has set up internet, or that an existing connection exists.
|
I want this to be able to be used on a fresh arch install with 0 dependencies, so, I will need to make sure that the user has set up internet, or that an existing connection exists.
|
||||||
|
|
||||||
I also need to make sure that all required programs are then sucessfully installed, and that some configs are written.
|
I also need to make sure that all required programs are then successfully installed, and that some configs are written.
|
||||||
|
|
||||||
> Ill need to do this for lightdm and lightdm webkit3 greeter currently.
|
> Ill need to do this for lightdm and lightdm webkit3 greeter currently.
|
||||||
> will also need to set shell, if they install my default programs, to fish.
|
> will also need to set shell, if they install my default programs, to fish.
|
||||||
|
|
||||||
remove rofi from xmonad.hs
|
|
||||||
|
|
||||||
review xmonad.sh for default programs / dependencies
|
review xmonad.sh for default programs / dependencies
|
||||||
|
|
||||||
|
|
||||||
@ -50,4 +48,4 @@ setup.sh will then...
|
|||||||
6. install my scripts
|
6. install my scripts
|
||||||
1. copy inks-scrips to /usr/local/bin as it should be in path by default
|
1. copy inks-scrips to /usr/local/bin as it should be in path by default
|
||||||
7. install my config
|
7. install my config
|
||||||
1. warn user that if they didn't intstall default programs, they'll need to edit xmonad.hs
|
1. warn user that if they didn't install default programs, they'll need to edit xmonad.hs
|
||||||
|
|||||||
@ -22,7 +22,7 @@ pulseaudio
|
|||||||
nfs-utils
|
nfs-utils
|
||||||
network-manager-applet
|
network-manager-applet
|
||||||
wget
|
wget
|
||||||
volumeicon
|
volctl
|
||||||
unzip
|
unzip
|
||||||
ttf-fira-code
|
ttf-fira-code
|
||||||
trayer
|
trayer
|
||||||
@ -45,6 +45,7 @@ xdotool
|
|||||||
xterm
|
xterm
|
||||||
flameshot
|
flameshot
|
||||||
simple-mtpfs
|
simple-mtpfs
|
||||||
|
micro
|
||||||
DEPENDENCIES_END
|
DEPENDENCIES_END
|
||||||
|
|
||||||
DEPENDENCIES_LAPTOP_START
|
DEPENDENCIES_LAPTOP_START
|
||||||
@ -67,6 +68,8 @@ visual-studio-code-bin
|
|||||||
DEFAULTS_END
|
DEFAULTS_END
|
||||||
|
|
||||||
MISC_START
|
MISC_START
|
||||||
|
lyx
|
||||||
|
kile
|
||||||
plexamp-appimage
|
plexamp-appimage
|
||||||
mpv
|
mpv
|
||||||
kdeconnect
|
kdeconnect
|
||||||
|
|||||||
@ -25,11 +25,5 @@ case $input in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
default_loc=/tmp/sudo-password
|
|
||||||
|
|
||||||
if [ ! -f "$default_loc" ] ; then
|
|
||||||
get-sudo-password
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd dmenu-inkletblot
|
cd dmenu-inkletblot
|
||||||
cat $default_loc | sudo -S make clean install
|
sudo -S make clean install
|
||||||
@ -2,10 +2,30 @@
|
|||||||
|
|
||||||
default_programs="./default-programs"
|
default_programs="./default-programs"
|
||||||
dependencies=$(sed -n '/DEPENDENCIES_START/,/DEPENDENCIES_END/p' $default_programs | sed -e 's/DEPENDENCIES_START//' -e 's/DEPENDENCIES_END//')
|
dependencies=$(sed -n '/DEPENDENCIES_START/,/DEPENDENCIES_END/p' $default_programs | sed -e 's/DEPENDENCIES_START//' -e 's/DEPENDENCIES_END//')
|
||||||
|
laptop_dependencies=$(sed -n '/DEPENDENCIES_LAPTOP_START/,/DEPENDENCIES_LAPTOP_END/p' $default_programs | sed -e 's/DEPENDENCIES_LAPTOP_START//' -e 's/DEPENDENCIES_LAPTOP_END//')
|
||||||
|
laptop=0
|
||||||
|
|
||||||
# check user is happy to run this script
|
# check user is happy to run this script
|
||||||
echo "This script is going to install all of the programs required for my scripts and dotfiles to function in a bisic manner. As such it will ask for root privilages."
|
echo "This script is going to install all of the programs required for my scripts and dotfiles to function in a bisic manner. As such it will ask for root privilages."
|
||||||
echo "Dependencies:$dependencies"
|
echo "Dependencies:$dependencies"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "If you are installing this on a laptop there are a couple of laptop specific dependencies that need to be installed as well..."
|
||||||
|
read -r -p "Would you like to install these? [y/N] " laptop_input
|
||||||
|
case $laptop_input in
|
||||||
|
[yY][eE][sS] | [yY])
|
||||||
|
echo "The extra dependencies will be installed..."
|
||||||
|
laptop=1
|
||||||
|
;;
|
||||||
|
[nN][oO] | [nN])
|
||||||
|
echo "Not installing extra dependencies..."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid input... Not installing extra dependencies..."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
read -r -p "Are you sure you want to continue? [y/N] " input
|
read -r -p "Are you sure you want to continue? [y/N] " input
|
||||||
case $input in
|
case $input in
|
||||||
[yY][eE][sS] | [yY])
|
[yY][eE][sS] | [yY])
|
||||||
@ -40,6 +60,21 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $laptop -eq 1 ]; then
|
||||||
|
# run though each laptop dependency and install it if it's not already installed
|
||||||
|
for dependency in $laptop_dependencies
|
||||||
|
do
|
||||||
|
if ! yay -Qi $dependency &> /dev/null; then
|
||||||
|
echo "Installing $dependency and it's dependencies..."
|
||||||
|
yay -S --noconfirm $dependency &> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! yay -Qi $dependency &> /dev/null; then
|
||||||
|
failures+=("$dependency\n")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
total_failures=$((${#failures[@]}))
|
total_failures=$((${#failures[@]}))
|
||||||
|
|
||||||
if [ $total_failures -gt 0 ]; then
|
if [ $total_failures -gt 0 ]; then
|
||||||
|
|||||||
@ -4,7 +4,7 @@ default_programs="./default-programs"
|
|||||||
dependencies=$(sed -n '/MISC_START/,/MISC_END/p' $default_programs | sed -e 's/MISC_START//' -e 's/MISC_END//')
|
dependencies=$(sed -n '/MISC_START/,/MISC_END/p' $default_programs | sed -e 's/MISC_START//' -e 's/MISC_END//')
|
||||||
|
|
||||||
# check user is happy to run this script
|
# check user is happy to run this script
|
||||||
echo "This script is going to install all of my default programs, e.g.: browser, rss reader, etc. As such it will ask for root privilages."
|
echo "This script is going to install all of my misc programs that I frequently use."
|
||||||
echo "Misc programs:$dependencies"
|
echo "Misc programs:$dependencies"
|
||||||
read -r -p "Are you sure you want to continue? [y/N] " input
|
read -r -p "Are you sure you want to continue? [y/N] " input
|
||||||
case $input in
|
case $input in
|
||||||
|
|||||||
@ -32,11 +32,11 @@ case $input in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if ! command -v fakeroot &> /dev/null; then
|
if ! command -v fakeroot &> /dev/null; then
|
||||||
cat $default_loc | sudo -S pacman -Sy --noconfirm base-devel
|
sudo -S pacman -Sy --noconfirm base-devel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /opt
|
cd /opt
|
||||||
cat $default_loc | sudo -S git clone https://aur.archlinux.org/yay.git
|
sudo -S git clone https://aur.archlinux.org/yay.git
|
||||||
cat $default_loc | sudo -S chown -R $USER:users ./yay
|
sudo -S chown -R $USER:users ./yay
|
||||||
cd yay
|
cd yay
|
||||||
makepkg -si
|
makepkg -si
|
||||||
29
setup
29
setup
@ -85,11 +85,17 @@ function install_scripts {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd $working_dir
|
cd $working_dir
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
./install-scripts
|
./install-scripts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_dmenu {
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd $working_dir
|
||||||
|
./install-dmenu-inkletblot
|
||||||
|
}
|
||||||
|
|
||||||
# install my config
|
# install my config
|
||||||
function install_config {
|
function install_config {
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
@ -110,6 +116,7 @@ echo " deps : Install the dependencies for my scripts and window manager"
|
|||||||
echo " defaults : Install my chosen default programs"
|
echo " defaults : Install my chosen default programs"
|
||||||
echo " misc : Install my collection of misc - nice to have - programs"
|
echo " misc : Install my collection of misc - nice to have - programs"
|
||||||
echo " scripts : Install my scirpts"
|
echo " scripts : Install my scirpts"
|
||||||
|
echo " dmenu : Install my customisation of dmenu"
|
||||||
echo " config : Install my dotfiles to the system"
|
echo " config : Install my dotfiles to the system"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Note: it is expected that the initial run of this script lets each stage complete sucessfully."
|
echo "Note: it is expected that the initial run of this script lets each stage complete sucessfully."
|
||||||
@ -128,6 +135,7 @@ case $1 in
|
|||||||
install_defaults
|
install_defaults
|
||||||
install_misc
|
install_misc
|
||||||
install_scripts
|
install_scripts
|
||||||
|
install_dmenu
|
||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -141,6 +149,7 @@ case $1 in
|
|||||||
install_defaults
|
install_defaults
|
||||||
install_misc
|
install_misc
|
||||||
install_scripts
|
install_scripts
|
||||||
|
install_dmenu
|
||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -153,6 +162,7 @@ case $1 in
|
|||||||
install_defaults
|
install_defaults
|
||||||
install_misc
|
install_misc
|
||||||
install_scripts
|
install_scripts
|
||||||
|
install_dmenu
|
||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -164,6 +174,7 @@ case $1 in
|
|||||||
install_defaults
|
install_defaults
|
||||||
install_misc
|
install_misc
|
||||||
install_scripts
|
install_scripts
|
||||||
|
install_dmenu
|
||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -174,6 +185,7 @@ case $1 in
|
|||||||
else
|
else
|
||||||
install_misc
|
install_misc
|
||||||
install_scripts
|
install_scripts
|
||||||
|
install_dmenu
|
||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -182,6 +194,15 @@ case $1 in
|
|||||||
install_scripts
|
install_scripts
|
||||||
else
|
else
|
||||||
install_scripts
|
install_scripts
|
||||||
|
install_dmenu
|
||||||
|
install_config
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
dmenu)
|
||||||
|
if [ "$2" = "only" ]; then
|
||||||
|
install_dmenu
|
||||||
|
else
|
||||||
|
install_dmenu
|
||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -199,4 +220,8 @@ case $1 in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user