Фиксы $HOME, $USER + dotfiles

experimental
Anthony Axenov 2022-01-09 17:14:15 +08:00
parent 3f4a7b0504
commit cd0dc9d988
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
9 changed files with 29 additions and 29 deletions

View File

@ -2,7 +2,7 @@
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/anthony/.oh-my-zsh"
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@ -103,4 +103,4 @@ source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
source ~/.aliases
source ~/.bash_aliases

View File

@ -7,7 +7,7 @@ echo
if installed git; then
[ ! -d "/usr/src/git" ] && sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git
sudo chown -R $USER: /usr/src/git
cd /usr/src/git/
sudo make prefix=/usr/local all
sudo make prefix=/usr/local install
@ -21,9 +21,9 @@ else
cd /usr/src
sudo rm -rf git
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git
sudo chown -R $USER: /usr/src/git
fi
git config set --global user.name 'AnthonyAxenov'
git config set --global user.email 'anthonyaxenov@gmail.com'
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
DOTFILESDIR="$ENVDIR"/dotfiles
git --version
# TODO: cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig

View File

@ -20,7 +20,7 @@ echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://
sudo apt update
sudo apt install -y --autoremove syncthing
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O /home/anthony/.local/share/applications/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O /home/anthony/.local/share/applications/syncthing-ui.desktop
ln -s /home/anthony/.local/share/applications/syncthing-start.desktop /home/anthony/.config/autostart/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O $HOME/.local/share/applications/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O $HOME/.local/share/applications/syncthing-ui.desktop
ln -s $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
# или демоном: https://habr.com/ru/post/350892/

View File

@ -21,5 +21,5 @@ Categories=Utility,Network
Terminal=false
Type=Application
Encoding=UTF-8
" > /home/anthony/.local/share/applications/Postman.desktop
" > $HOME/.local/share/applications/Postman.desktop
sudo update-desktop-database

View File

@ -16,10 +16,10 @@ sudo rm -rf /usr/local/go
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE
sudo tar -xzf $FILE -C /usr/local
rm -rf /tmp/$FILE
sudo chown anthony: -R /usr/local/go
sudo chown $USER: -R /usr/local/go
echo "export PATH=$PATH:/usr/local/go/bin" >> /home/anthony/.profile
echo "export GOPATH=~/.go" >> /home/anthony/.profile
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
echo "export GOPATH=~/.go" >> $HOME/.profile
# source ~/.profile
echo

View File

@ -33,7 +33,7 @@ else
sudo rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master
sudo rm -f /usr/src/appmenu-applet.zip
fi
sudo chown -R anthony: /usr/src/appmenu-applet
sudo chown -R $USER: /usr/src/appmenu-applet
cd /usr/src/appmenu-applet/
sh ./install.sh
echo

View File

@ -1,10 +1,15 @@
#!/bin/bash
# . "../src/01-common.sh" || exit 5
# title "Copying dotfiles..."
# require_start
echo
echo "==============================================="
echo "Installing dotfiles..."
echo "==============================================="
echo
# cp $DOTFILESDIR/.aliases $HOME/.aliases
# cp $DOTFILESDIR/.bashrc $HOME/.bashrc
# cp $DOTFILESDIR/.zshrc $HOME/.zshrc
# cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
# cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
DOTFILESDIR="$ENVDIR"/dotfiles
cp $DOTFILESDIR/.bash_aliases $HOME/.bash_aliases
cp $DOTFILESDIR/.bashrc $HOME/.bashrc
cp $DOTFILESDIR/.zshrc $HOME/.zshrc
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны

View File

@ -1,11 +1,6 @@
#!/bin/bash
set -e
OLDDIR=`pwd`
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
INSTALLDIR="$ENVDIR"/install
DOTFILESDIR="$ENVDIR"/dotfiles
for script in "$INSTALLDIR"/*.sh
for script in "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/install/*.sh
do
. "$script"
done