From 3f4a7b05042a42134e625a1b74327ad302552ae4 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 9 Jan 2022 17:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=81=D1=82=D0=B0=D1=82=D0=BA=D0=B8:=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D1=91=D0=BD=20common.sh=20=D0=B8=20?= =?UTF-8?q?=D0=BF=D1=80=20=D0=BC=D0=B5=D0=BB=D0=BE=D1=87=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/120-chrome.sh | 2 +- install/999-dotfiles.sh | 16 +++++++------- src/01-common.sh | 49 ----------------------------------------- start.sh | 8 ------- 4 files changed, 9 insertions(+), 66 deletions(-) delete mode 100755 src/01-common.sh diff --git a/install/120-chrome.sh b/install/120-chrome.sh index 3868422..c250505 100755 --- a/install/120-chrome.sh +++ b/install/120-chrome.sh @@ -7,7 +7,7 @@ echo # https://t.me/axenov_blog/251 -# snapi chromium +# sudo snap install chromium wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -O /tmp/google-chrome-stable_current_amd64.deb sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb rm /tmp/google-chrome-stable_current_amd64.deb diff --git a/install/999-dotfiles.sh b/install/999-dotfiles.sh index c22fa26..8d673d4 100755 --- a/install/999-dotfiles.sh +++ b/install/999-dotfiles.sh @@ -1,10 +1,10 @@ #!/bin/bash -. "../src/01-common.sh" || exit 5 -title "Copying dotfiles..." -require_start +# . "../src/01-common.sh" || exit 5 +# title "Copying dotfiles..." +# require_start -cp $DOTFILESDIR/.aliases $HOME/.aliases -cp $DOTFILESDIR/.bashrc $HOME/.bashrc -cp $DOTFILESDIR/.zshrc $HOME/.zshrc -cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig -cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны +# cp $DOTFILESDIR/.aliases $HOME/.aliases +# cp $DOTFILESDIR/.bashrc $HOME/.bashrc +# cp $DOTFILESDIR/.zshrc $HOME/.zshrc +# cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig +# cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны diff --git a/src/01-common.sh b/src/01-common.sh deleted file mode 100755 index e5b88e1..0000000 --- a/src/01-common.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -e -source "./../src/00-io.sh" - -title() { - info "" - info "===============================================" - info " $1" - info "===============================================" - info "" -} - -apti() { - sudo apt install -y --autoremove $@ -} - -aptu() { - sudo apt update -} - -aptug() { - sudo apt upgrade -y --autoremove -} - -snapi() { - snap install $1 2>/dev/null - [[ $? -ne 0 ]] && snap install $1 --classic -} - -installed() { - command -v "$1" >/dev/null 2>&1 -} - -die() { - error "$1" - exit $2 || 1 -} - -require_root() { - [ $(id -u) > "0" ] && die "You must run this script with sudo!" 1 -} - -require_user() { - [ $(id -u) == "0" ] && die "You must run this script WITHOUT sudo!" 2 -} - -require_start() { - [ -z "$ENVDIR" ] && die "You must run start.sh to execute this script!" 3 -} diff --git a/start.sh b/start.sh index 67fbcf1..e670442 100755 --- a/start.sh +++ b/start.sh @@ -2,18 +2,10 @@ set -e OLDDIR=`pwd` ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -ENVSRCDIR="$ENVDIR"/src INSTALLDIR="$ENVDIR"/install DOTFILESDIR="$ENVDIR"/dotfiles -for script in "$ENVSRCDIR"/*.sh -do - . "$script" -done - for script in "$INSTALLDIR"/*.sh do . "$script" done - -# neofetch