Skip to content

Commit e94818a

Browse files
authored
Merge pull request #2 from CleoQc/master
make install_script_tools quieter and change README
2 parents a6a1252 + ab531fa commit e94818a

2 files changed

Lines changed: 15 additions & 19 deletions

File tree

README.md

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# script_tools
22
Common installation scripts used in multiple products around the Dexter Industries Galaxy of products.
3+
4+
# to install:
5+
curl https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

install_script_tools.sh

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#####################################################################
33
#####################################################################
44
#
5-
# curl
5+
# to install:
6+
# curl https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash
67
#
78
#####################################################################
89
#####################################################################
@@ -16,42 +17,34 @@ pushd $PIHOME
1617
result=${PWD##*/}
1718
# check if ~/Dexter exists, if not create it
1819
if [ ! -d $DEXTER ] ; then
19-
echo "creating $PIHOME/$DEXTER"
20-
mkdir $DEXTER
20+
mkdir $DEXTER
2121
fi
2222
# go into $DEXTER
2323
cd $DEXTER
24-
echo $PWD
24+
2525

2626
# check if /home/pi/Dexter/lib exists, if not create it
2727
if [ ! -d $LIB ] ; then
28-
echo "creating $PIHOME/$DEXTER/$LIB"
29-
mkdir $LIB
28+
mkdir $LIB
3029
fi
3130
cd $LIB
32-
echo $PWD
3331

3432
# check if /home/pi/Dexter/lib/Dexter exists, if not create it
3533
if [ ! -d $DEXTER ] ; then
36-
echo "creating $PIHOME/$DEXTER/$LIB/$Dexter"
37-
mkdir $DEXTER
34+
mkdir $DEXTER
3835
fi
3936
cd $DEXTER
40-
echo $PWD
37+
4138

4239
# check if /home/pi/Dexter/lib/script_tools exists
4340
# if yes refresh the folder
4441
# if not, clone the folder
45-
if [ -d $SCRIPT ] ; then
46-
echo "Pulling"
47-
cd $SCRIPT
48-
echo $PWD
49-
echo "now in $PIHOME/$DEXTER/$LIB/$SCRIPT"
50-
sudo git pull
42+
if [ ! -d $SCRIPT ] ; then
43+
# clone the folder
44+
sudo git clone https://github.com/DexterInd/script_tools.git
5145
else
52-
# clone the folder
53-
echo "Cloning"
54-
sudo git clone https://github.com/DexterInd/script_tools.git
46+
cd $SCRIPT
47+
sudo git pull
5548
fi
5649

5750
popd

0 commit comments

Comments
 (0)