nothing... is allowed... to die. ~SOMA

This commit is contained in:
David Neumaier 2026-04-01 16:21:57 +02:00
parent 1f75254004
commit b93f250486
1 changed files with 9 additions and 3 deletions

View File

@ -3,7 +3,7 @@
read -p "Do you want to install Qash? This will move your old .bashrc and replace it with Qash. y/N " read -p "Do you want to install Qash? This will move your old .bashrc and replace it with Qash. y/N "
if [[ $REPLY == 'y' ]]; then if [[ $REPLY == 'y' ]]; then
dir=~/qash/ dir=~/qash
if [[ $# -gt 1 ]]; then if [[ $# -gt 1 ]]; then
dir=$1 dir=$1
fi fi
@ -24,8 +24,14 @@ if [[ $REPLY == 'y' ]]; then
cp -r ./library/hooks/* $dir/hooks/ cp -r ./library/hooks/* $dir/hooks/
echo "Backing up old .bashrc..." echo "Backing up old .bashrc..."
mv ~/.bashrc ~/.bashrc.old i=0
source ./library/load.sh while [[ -f ~/.bashrc.bak.$i ]]
do
i=$i + 1
done;
mv ~/.bashrc ~/.bashrc.bak.$i
source $dir/load.sh
echo "#!/bin/bash" >> ~/.bashrc echo "#!/bin/bash" >> ~/.bashrc
echo "# Qash $QASH_VERSION" >> ~/.bashrc echo "# Qash $QASH_VERSION" >> ~/.bashrc
echo "# Installed on $(date -u +'%02d.%02m.%Y %02H:%02M:%02S')" >> ~/.bashrc echo "# Installed on $(date -u +'%02d.%02m.%Y %02H:%02M:%02S')" >> ~/.bashrc