feat(sway): add script to install sway dotfile
This commit is contained in:
parent
e3b60d670a
commit
9ba3a15144
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# to be in script folder
|
||||
cd $(dirname $0)
|
||||
CURRENT_DIR=$(pwd)
|
||||
CONFIG_DIR="${HOME}/.config/sway"
|
||||
CONFIG_FILE="${CONFIG_DIR}/config"
|
||||
DOTFILE="${CURRENT_DIR}/sway/config"
|
||||
echo "installing sway"
|
||||
|
||||
if [ -f "$CONFIG_FILE" ]
|
||||
then
|
||||
echo "backuping existing "
|
||||
cp $CONFIG_FILE $CONFIG_FILE.bkp
|
||||
rm $CONFIG_FILE
|
||||
else
|
||||
if [ ! -d "$CONFIG_DIR" ]
|
||||
then
|
||||
echo "creating ${CONFIG_DIR}"
|
||||
mkdir $CONFIG_DIR
|
||||
fi
|
||||
fi
|
||||
echo "Linking ${DOTFILE}"
|
||||
ln -s ${DOTFILE} ${CONFIG_FILE}
|
Loading…
Reference in New Issue