Skip to content

Commit

Permalink
update bash only
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant0wan committed Mar 11, 2024
1 parent 73d3286 commit f0d2ded
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tools/bash.install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
#!/bin/sh
set -o errexit
set -o nounset
#githubsource="https://raw.githubusercontent.com/Ant0wan/config-and-tools/main/config/"
githubsource="https://raw.githubusercontent.com/Ant0wan/config-and-tools/main/config/"
if test -e ~/.bashrc; then
if ! grep -Fxq ' for rc in ~/.bashrc.d/*; do' ~/.bashrc; then
printf '
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc
' >> ~/.bashrc
fi

else
if test -e /etc/skel/.bashrc; then
cp /etc/skel/.bashrc ~
else
wget "${githubsource}bashrc" -O "$HOME"/.bashrc
fi
fi
mkdir -p "$HOME"/.bashrc.d/

0 comments on commit f0d2ded

Please sign in to comment.