mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 11:19:22 +01:00
bashrc & zshrc: add function shell-things. Closes #21.
This commit is contained in:
parent
1e06d4db5f
commit
b4ece3743b
@ -26,4 +26,5 @@ cat chmod > ~/chmod
|
|||||||
cat wwwuser > ~/wwwuser
|
cat wwwuser > ~/wwwuser
|
||||||
chmod a+xr ~/chmod
|
chmod a+xr ~/chmod
|
||||||
chmod a+r ~/wwwuser
|
chmod a+r ~/wwwuser
|
||||||
|
touch ~/.MKAYSIGREP
|
||||||
# vim : set ft=sh :
|
# vim : set ft=sh :
|
||||||
|
49
bashrc
49
bashrc
@ -644,6 +644,55 @@ function gribble-gpg-everify() {
|
|||||||
rm -rf bitcoin_otc.txt bitcoin_otc.txt.asc
|
rm -rf bitcoin_otc.txt bitcoin_otc.txt.asc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function will install/upgrade shell-things.
|
||||||
|
|
||||||
|
function shell-things {
|
||||||
|
|
||||||
|
export SHELL_THINGS_REPO=$HOME/.shell-things
|
||||||
|
export MKAYSIGREP=$HOME/.MKAYSIGREP
|
||||||
|
|
||||||
|
# Check if ~/.shell-things exists and cd and pull.
|
||||||
|
if [ -d $SHELL_THINGS_REPO ]; then
|
||||||
|
echo "shell-things: $SHELL_THINGS_REPO exists, git pulling..."
|
||||||
|
echo ""
|
||||||
|
cd $SHELL_THINGS_REPO
|
||||||
|
git pull
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Installing/Upgrading..."
|
||||||
|
echo ""
|
||||||
|
# If it doesn't exist...
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: $SHELL_THINGS_REPO doesn't exist, cloning..."
|
||||||
|
echo ""
|
||||||
|
git clone https://github.com/Mkaysi/shell-things.git $SHELL_THINGS_REPO
|
||||||
|
cd $SHELL_THINGS_REPO
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Installing/Upgrading..."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Installing...
|
||||||
|
./install.run
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Installing finished."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
#If ~/.MKAYSIGREP exists, run that script too...
|
||||||
|
if [ -f "$MKAYSIGREP" ]; then
|
||||||
|
echo "MKAYSIGREP has been used previously, Installing/Upgrading."
|
||||||
|
./.install.MKAYSIGREP.run
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Everthing is now done :)"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
cd
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# .custom
|
# .custom
|
||||||
if [ -f ~/.custom ]; then
|
if [ -f ~/.custom ]; then
|
||||||
source ~/.custom
|
source ~/.custom
|
||||||
|
49
zshrc
49
zshrc
@ -616,6 +616,55 @@ function gribble-gpg-everify() {
|
|||||||
rm -rf bitcoin_otc.txt bitcoin_otc.txt.asc
|
rm -rf bitcoin_otc.txt bitcoin_otc.txt.asc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function will install/upgrade shell-things.
|
||||||
|
|
||||||
|
function shell-things {
|
||||||
|
|
||||||
|
export SHELL_THINGS_REPO=$HOME/.shell-things
|
||||||
|
export MKAYSIGREP=$HOME/.MKAYSIGREP
|
||||||
|
|
||||||
|
# Check if ~/.shell-things exists and cd and pull.
|
||||||
|
if [ -d $SHELL_THINGS_REPO ]; then
|
||||||
|
echo "shell-things: $SHELL_THINGS_REPO exists, git pulling..."
|
||||||
|
echo ""
|
||||||
|
cd $SHELL_THINGS_REPO
|
||||||
|
git pull
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Installing/Upgrading..."
|
||||||
|
echo ""
|
||||||
|
# If it doesn't exist...
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: $SHELL_THINGS_REPO doesn't exist, cloning..."
|
||||||
|
echo ""
|
||||||
|
git clone https://github.com/Mkaysi/shell-things.git $SHELL_THINGS_REPO
|
||||||
|
cd $SHELL_THINGS_REPO
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Installing/Upgrading..."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Installing...
|
||||||
|
./install.run
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Installing finished."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
#If ~/.MKAYSIGREP exists, run that script too...
|
||||||
|
if [ -f "$MKAYSIGREP" ]; then
|
||||||
|
echo "MKAYSIGREP has been used previously, Installing/Upgrading."
|
||||||
|
./.install.MKAYSIGREP.run
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "shell-things: Everthing is now done :)"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
cd
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Source files for miscannellious modifications.
|
# Source files for miscannellious modifications.
|
||||||
|
|
||||||
# .custom
|
# .custom
|
||||||
|
Loading…
Reference in New Issue
Block a user