Further tidying and making
This commit is contained in:
@@ -10,5 +10,5 @@ DEBIAN_FRONTEND=noninteractive sudo apt-get \
|
||||
-o Dpkg::Options::="--force-confold" upgrade -y
|
||||
|
||||
# Package installs
|
||||
pkglist=$(cat $install_dir/00-apt-pkglist)
|
||||
sudo apt-get install -y $pkglist
|
||||
readonly apt_pkglist=$(cat $install_dir/00-apt-pkglist)
|
||||
sudo apt-get install -y $apt_pkglist
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
#
|
||||
|
||||
# 1. fish shell is installed
|
||||
if [ ! hash fish ] 2>/dev/null; then
|
||||
if [ is_missing fish ] 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing fish...\n"
|
||||
|
||||
@@ -22,23 +23,20 @@ fi
|
||||
printf "fish is installed\n"
|
||||
|
||||
# 2. fish shell is default login shell
|
||||
fish_path=$(which fish)
|
||||
if [ $SHELL != fish_path ]; then
|
||||
readonly fish_path=$(which fish)
|
||||
if [ $SHELL != fish_path ]
|
||||
then
|
||||
|
||||
printf "Setting fish as default...\n"
|
||||
|
||||
# Update default login shell
|
||||
chsh -s $fish_path $USER
|
||||
usermod -s $fish_path $USER
|
||||
|
||||
fi
|
||||
printf "fish is default login shell\n"
|
||||
|
||||
# 3. fish dotfiles are symlinked
|
||||
target="$HOME/.config/fish"
|
||||
for file in $(ls -d $script_dir/fish/*); do
|
||||
rel_path=$(realpath --relative-to="$target" "$file")
|
||||
printf "Linking $file to $target as $rel_path...\n"
|
||||
ln -sv $rel_path $target
|
||||
done
|
||||
readonly fish_source="$dotfiles_dir/fish/*"
|
||||
readonly fish_target="$HOME/.config/fish"
|
||||
link_folder "$fish_source" "$fish_target"
|
||||
printf "fish dotfiles linked\n"
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
#
|
||||
|
||||
# 1. git dotfiles are symlinked
|
||||
target="$HOME"
|
||||
for file in $(ls -d $script_dir/git/*); do
|
||||
rel_path=$(realpath --relative-to="$target" "$file")
|
||||
printf "Linking $file to $target as $rel_path...\n"
|
||||
ln -sv $rel_path $target
|
||||
done
|
||||
readonly git_source="$dotfiles_dir/git/*"
|
||||
readonly git_target="$HOME"
|
||||
link_folder $git_source $git_target
|
||||
printf "git dotfiles linked\n"
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
#
|
||||
|
||||
# 1.keybase is installed
|
||||
if [ ! hash fish ] 2>/dev/null; then
|
||||
if [ ! hash keybase ] 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing keybase...\n"
|
||||
|
||||
curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
|
||||
sudo apt install ./keybase_amd64.deb
|
||||
sudo apt-get install -y ./keybase_amd64.deb
|
||||
run_keybase
|
||||
|
||||
fi
|
||||
printf "keybase is installed\n"
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#
|
||||
|
||||
# 1. docker is installed
|
||||
if ! hash docker 2>/dev/null; then
|
||||
if ! hash docker 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing docker...\n"
|
||||
|
||||
@@ -32,7 +33,8 @@ fi
|
||||
printf "docker is installed\n"
|
||||
|
||||
# 2. docker-compose if installed
|
||||
if ! hash docker-compose 2>/dev/null; then
|
||||
if ! hash docker-compose 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing docker-compose...\n"
|
||||
|
||||
@@ -45,14 +47,16 @@ fi
|
||||
printf "docker-compose is installed\n"
|
||||
|
||||
# 3. docker group exists
|
||||
group='docker'
|
||||
if ! grep -q $group /etc/group; then
|
||||
sudo groupadd docker
|
||||
readonly docker_group='docker'
|
||||
if ! grep -q $docker_group /etc/group
|
||||
then
|
||||
sudo groupadd $docker_group
|
||||
fi
|
||||
printf "group '$group' is created\n"
|
||||
printf "group '$docker_group' is created\n"
|
||||
|
||||
# 4. user is in docker group
|
||||
if ! groups $USER | grep -q "\b$group\b"; then
|
||||
if ! groups $USER | grep -q "\b$docker_group\b"
|
||||
then
|
||||
sudo usermod -aG docker $USER
|
||||
fi
|
||||
printf "user '$USER' is in '$group' group\n"
|
||||
printf "user '$USER' is in '$docker_group' group\n"
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
#
|
||||
|
||||
# 1. pyenv is installed
|
||||
if ! hash pyenv 2>/dev/null; then
|
||||
if ! hash pyenv 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing pyenv...\n"
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
#
|
||||
|
||||
# 1. python is installed
|
||||
if ! hash python 2>/dev/null; then
|
||||
if ! hash python 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing python...\n"
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
#
|
||||
|
||||
# 1. poetry is installed
|
||||
if ! hash poetry 2>/dev/null; then
|
||||
if ! hash poetry 2>/dev/null
|
||||
then
|
||||
|
||||
printf "Installing poetry...\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user