dotfiles/setup.sh

42 lines
915 B
Bash
Executable File

#!/bin/sh
#
#set -x
dotPath=".config/dotfiles"
cp $dotPath/.zshrc $dotPath/.vimrc $dotPath/.zprofile $dotPath/.gitconfig $dotPath/.p10k.zsh .
if [ -d ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k ]; then
echo "pl10k already exists, skipping"
else
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
fi
if [ $(id -u) -ne 0 ]
then
echo "run me as root to copy cdbm & lsd to the system"
else
if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin; fi
OS=`uname`
case "$OS" in
Darwin)
ARCH=`uname -m`
case "$ARCH" in
arm64)
cp $dotPath/cdbm/Darwin/arm64/cdbm /usr/local/bin
;;
*)
cp $dotPath/cdbm/Darwin/x86_64/cdbm /usr/local/bin
;;
esac
;;
Linux)
cp $dotPath//cdbm/Linux/cdbm /usr/local/bin
;;
*)
$OS is not supported
;;
esac
fi