Фиксы $HOME, $USER + dotfiles
This commit is contained in:
parent
3f4a7b0504
commit
cd0dc9d988
@ -2,7 +2,7 @@
|
|||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# 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
|
# 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,
|
# 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 zshconfig="mate ~/.zshrc"
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
||||||
source ~/.aliases
|
source ~/.bash_aliases
|
||||||
|
@ -7,7 +7,7 @@ echo
|
|||||||
|
|
||||||
if installed git; then
|
if installed git; then
|
||||||
[ ! -d "/usr/src/git" ] && sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
[ ! -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/
|
cd /usr/src/git/
|
||||||
sudo make prefix=/usr/local all
|
sudo make prefix=/usr/local all
|
||||||
sudo make prefix=/usr/local install
|
sudo make prefix=/usr/local install
|
||||||
@ -21,9 +21,9 @@ else
|
|||||||
cd /usr/src
|
cd /usr/src
|
||||||
sudo rm -rf git
|
sudo rm -rf git
|
||||||
sudo git clone https://github.com/git/git.git --depth=1 /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
|
||||||
fi
|
fi
|
||||||
git config set --global user.name 'AnthonyAxenov'
|
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
git config set --global user.email 'anthonyaxenov@gmail.com'
|
DOTFILESDIR="$ENVDIR"/dotfiles
|
||||||
git --version
|
git --version
|
||||||
# TODO: cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
|
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
|
@ -20,7 +20,7 @@ echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y --autoremove syncthing
|
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-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/anthony/.local/share/applications/syncthing-ui.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/anthony/.local/share/applications/syncthing-start.desktop /home/anthony/.config/autostart/syncthing-start.desktop
|
ln -s $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
|
||||||
# или демоном: https://habr.com/ru/post/350892/
|
# или демоном: https://habr.com/ru/post/350892/
|
||||||
|
@ -21,5 +21,5 @@ Categories=Utility,Network
|
|||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
" > /home/anthony/.local/share/applications/Postman.desktop
|
" > $HOME/.local/share/applications/Postman.desktop
|
||||||
sudo update-desktop-database
|
sudo update-desktop-database
|
||||||
|
@ -16,10 +16,10 @@ sudo rm -rf /usr/local/go
|
|||||||
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE
|
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE
|
||||||
sudo tar -xzf $FILE -C /usr/local
|
sudo tar -xzf $FILE -C /usr/local
|
||||||
rm -rf /tmp/$FILE
|
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 PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
|
||||||
echo "export GOPATH=~/.go" >> /home/anthony/.profile
|
echo "export GOPATH=~/.go" >> $HOME/.profile
|
||||||
# source ~/.profile
|
# source ~/.profile
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -33,7 +33,7 @@ else
|
|||||||
sudo rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master
|
sudo rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master
|
||||||
sudo rm -f /usr/src/appmenu-applet.zip
|
sudo rm -f /usr/src/appmenu-applet.zip
|
||||||
fi
|
fi
|
||||||
sudo chown -R anthony: /usr/src/appmenu-applet
|
sudo chown -R $USER: /usr/src/appmenu-applet
|
||||||
cd /usr/src/appmenu-applet/
|
cd /usr/src/appmenu-applet/
|
||||||
sh ./install.sh
|
sh ./install.sh
|
||||||
echo
|
echo
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# . "../src/01-common.sh" || exit 5
|
echo
|
||||||
# title "Copying dotfiles..."
|
echo "==============================================="
|
||||||
# require_start
|
echo "Installing dotfiles..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
# cp $DOTFILESDIR/.aliases $HOME/.aliases
|
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
# cp $DOTFILESDIR/.bashrc $HOME/.bashrc
|
DOTFILESDIR="$ENVDIR"/dotfiles
|
||||||
# cp $DOTFILESDIR/.zshrc $HOME/.zshrc
|
|
||||||
# cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
|
cp $DOTFILESDIR/.bash_aliases $HOME/.bash_aliases
|
||||||
# cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны
|
cp $DOTFILESDIR/.bashrc $HOME/.bashrc
|
||||||
|
cp $DOTFILESDIR/.zshrc $HOME/.zshrc
|
||||||
|
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
|
||||||
|
cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны
|
||||||
|
7
start.sh
7
start.sh
@ -1,11 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
OLDDIR=`pwd`
|
for script in "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/install/*.sh
|
||||||
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
||||||
INSTALLDIR="$ENVDIR"/install
|
|
||||||
DOTFILESDIR="$ENVDIR"/dotfiles
|
|
||||||
|
|
||||||
for script in "$INSTALLDIR"/*.sh
|
|
||||||
do
|
do
|
||||||
. "$script"
|
. "$script"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user