summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-07-20 20:19:05 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-07-20 20:19:05 +0400
commit552a41f030839536b0f5c2090e4a3e460b5eb754 (patch)
tree30375ef149f7d8fe84ea33d3f20a48d0b790dca0
parent73e31b79de25298a519671ef8b6c2ab68af9c87e (diff)
build.sh removed
-rw-r--r--build.sh87
1 files changed, 0 insertions, 87 deletions
diff --git a/build.sh b/build.sh
deleted file mode 100644
index 7d8cc44..0000000
--- a/build.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-
-as_sudo(){
- SUDO=sudo
- $@
- SUDO=""
-}
-
-config_dir="${XDG_CONFIG_HOME:-$HOME/.config}"
-home_dir="$HOME"
-
-dotfiles_install() {
- [ -d $config_dir ] || mkdir -v $config_dir
- COPY ./src/dotfiles/* "$config_dir"
- COPY ./src/dotfiles/zsh/zshrc "$home_dir"/.zshrc
- COPY ./src/dotfiles/Xresources "$home_dir"/.Xresources
-}
-
-scripts_install() {
- [ -d /usr/local/bin ] || sudo mkdir -v /usr/local/bin
- as_sudo COPY ./src/scripts/* /usr/local/bin/
-}
-
-archlinux_install() {
- as_sudo COPY ./src/distros/arch-linux/pacman.conf /etc
-}
-
-profile_install() {
- [ -d /etc/profile.d ] || { sudo mkdir /etc/profile.d && printf "/etc/profile.d directory created" ; }
- as_sudo COPY ./src/etc/profile.d/theion.sh /etc/profile.d || echo "Couldn't install to /etc/profile.d"
-}
-
-help() {
- cat <<EOF
-Usage $0:
- -d Install dotfiles to .config
- -s Install scripts to /usr/local/bin
- -ds Install scripts and dotfiles
-
- --profile Install profile files
- --archlinux Install Arch linux specific files
- --force Overwrite the existing files
- --all Install everything (except Arch linux specific files)
-EOF
-exit 2
-}
-
-[ $# = 0 ] && help
-
-for argument in $@;do
- if [ $argument = "--force" ];then
- COPY(){ $SUDO cp -r $@; }
- break
- fi
- COPY(){ $SUDO cp -nr $@; }
-done
-
-for argument in $@;do
- case "$argument" in
- "-d") dotfiles_install;;
-
- "-s")
- scripts_install;;
-
- "-ds")
- dotfiles_install
- scripts_install
- ;;
-
- "--profile")
- profile_install;;
-
- "--archlinux")
- archlinux_install
- ;;
-
- "--all")
- dotfiles_install
- scripts_install
- profile_install
- ;;
-
- "--force");;
-
- *) help ;;
- esac
-done