Files
42header/set_header.sh
2021-10-23 15:16:30 +02:00

27 lines
451 B
Bash
Executable File

#!/bin/bash
# ./set_header.sh
# Set variables
if [ ! -z "$USER" ]
then
echo 'export USER=`/usr/bin/whoami`' >> ~/.zshrc
fi
if [ ! -z "$GROUP" ]
then
echo 'export GROUP=`/usr/bin/id -gn ${USER}`' >> ~/.zshrc
fi
if [ ! -z "$MAIL" ]
then
echo 'export MAIL="${USER}@student.42lausanne.ch"' >> ~/.zshrc
fi
test -d ~/.vim/plugin || mkdir -p ~/.vim/plugin
# Add stdheader to vim plugins
cp vim/stdheader.vim ~/.vim/plugin/
source ~/.zshrc