Skip to content

Commit

Permalink
fix README.md
Browse files Browse the repository at this point in the history
add bin/deployHome.sh
  • Loading branch information
Grigory Efimov committed Apr 28, 2018
1 parent 7ad781f commit 0d2ad6d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# home
деплой:
deploy:
```
VERSION='v0.1'
mkdir ~/tmp/ &&
wget -O ~/tmp/$VERSION.tar.gz https://github.com/fb929/home/archive/$VERSION.tar.gz &&
tar -zxvf ~/tmp/$VERSION.tar.gz
VERSION='0.1'
install -d $HOME/tmp/ &&
if [[ -d $HOME/tmp/home-$VERSION ]]; then
rm -rf $HOME/tmp/home-$VERSION
fi
wget --quiet --output-document=$HOME/tmp/v$VERSION.tar.gz https://github.com/fb929/home/archive/v$VERSION.tar.gz &&
tar --gzip --extract --directory=$HOME/tmp/ --exclude=README.md --file=$HOME/tmp/v$VERSION.tar.gz &&
rsync -a $HOME/tmp/home-$VERSION/ $HOME/
echo $VERSION > $HOME/.home_version
```

or run bin/deployHome.sh
12 changes: 12 additions & 0 deletions bin/deployHome.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

VERSION=${1:-"0.1"}

install -d $HOME/tmp/ &&
if [[ -d $HOME/tmp/home-$VERSION ]]; then
rm -rf $HOME/tmp/home-$VERSION
fi
wget --quiet --output-document=$HOME/tmp/v$VERSION.tar.gz https://github.com/fb929/home/archive/v$VERSION.tar.gz &&
tar --gzip --extract --directory=$HOME/tmp/ --exclude=README.md --file=$HOME/tmp/v$VERSION.tar.gz &&
rsync -a $HOME/tmp/home-$VERSION/ $HOME/
echo $VERSION > $HOME/.home_version

0 comments on commit 0d2ad6d

Please sign in to comment.