Article 4H7QM Need Someone to Review my Shell Script

Need Someone to Review my Shell Script

by
FOSSilized_Daemon
from LinuxQuestions.org on (#4H7QM)
I have been learning shell scripting for the past few days and decided to write my first script. Basically this script just creates all my directories I need in my home directory and installs my dotfiles. I was wondering if anyone could take a look at my shell script and give me some feedback, what can be done in a more minimal fasion and just if there is anyway I can improve my script. Thank you in advance, here it is:

Code:#/bin/sh

# create directories
mkdir -p {$HOME/docs,$HOME/docs/notes,$HOME/docs/pdfs,$HOME/docs/dev,$HOME/dl,$HOME/vids,$HOME/music,$HOME/pics,$HOME/.config,$HOME/.builds}

# move dotfiles into docs/dev and move back into dotfiles
cd $HOME && mv dotfiles docs/dev && cd docs/dev/dotfiles

# install config
cd config

cp -r dunst $HOME/.config/dunst
cp -r irssi $HOME/.config/irssi
cp -r mpd $HOME/.config/mpd
cp -r mpv $HOME/.config/mpv
cp -r nvim $HOME/.config/nvim
cp -r zathura $HOME/.config/zathura

# install home
cd ../home

cp -r .Xresources $HOME/.Xresources
cp -r .ksh_history $HOME/.ksh_history
cp -r .kshrc $HOME/.kshrc
cp -r .mpd $HOME/.mpd
cp -r .ncmpcpp $HOME/.ncmpcpp
cp -r .profile $HOME/.profile
cp -r .scripts $HOME/.scripts
cp -r .tmux.conf $HOME/.tmux.conf
cp -r .w3m $HOME/.w3m
cp -r .xsession $HOME/.xsession
doas cp -r fonts/* /usr/local/fonts/
doas cp -r systemerror.png /usr/local/share/backgrounds/

echo "dotfiles installed"I removed my edits as they were from me not paying attention and would just be confusing.latest?d=yIl2AUoC8zA latest?i=nAEqss6BtLI:RJWcem94w4E:F7zBnMy latest?i=nAEqss6BtLI:RJWcem94w4E:V_sGLiP latest?d=qj6IDK7rITs latest?i=nAEqss6BtLI:RJWcem94w4E:gIN9vFwnAEqss6BtLI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments