-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·46 lines (42 loc) · 1.42 KB
/
install
File metadata and controls
executable file
·46 lines (42 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: install
# Created: Friday, 2023/03/31 - 19:38:33
# Author.: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Friday, 2023/05/26 - 23:50:32
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 0.0.3.43
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# >
# ############################################################################
# HISTORY:
#
# check if git is available
if ! which git; then
echo "please install git to continue."
exit 1
fi
github=https://github.com
repo=fbnmtz/scripts
if [ -d ~/bin ] ; then
if [ -d ~/bin/.git ] ; then
cd ~/bin || exit 1
git pull
else
git clone "${github}/${repo}" /tmp/scripts
mv /tmp/scripts/* ~/bin/
rm -rf /tmp/scripts
fi
else
# clone this repo to your '/home'
git clone "${github}/${repo}" ~/bin
fi
# Add scripts to your system $PATH
if ! grep "\$PATH:\$HOME/bin" ~/.profile 1> /dev/null ; then
echo -e "\nexport PATH=\"\$PATH:\$HOME/bin\"" >> ~/.profile
fi