Skip to content

Commit

Permalink
Merge pull request #15 from vgeruso/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
vgeruso authored Nov 27, 2021
2 parents 8104955 + f4c7225 commit 021e24c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The cpn requires the following systems installed:
In the root directory `~/` execute:

```bash
$ wget https://raw.githubusercontent.com/vgeruso/cpn/1.2.4/install.sh
$ wget https://raw.githubusercontent.com/vgeruso/cpn/1.3.0/install.sh
```

```bash
Expand Down
4 changes: 2 additions & 2 deletions src/help.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
echo "cpn version 1.2.4"
echo "cpn version 1.3.0"
echo
echo "Usage: cpn [<flag>] [<command>] [<arg>]"
echo
Expand All @@ -13,4 +13,4 @@ echo " uninstall Uninstal cpn from your machine"
echo
echo "These are common cpn flags:"
echo " -h or --help Show this help list"
echo " -v or --version Show version cpn"
echo " -v or --version Show version cpn"
Empty file modified src/init.sh
100644 → 100755
Empty file.
Empty file modified src/options.sh
100644 → 100755
Empty file.
29 changes: 18 additions & 11 deletions src/update.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/usr/bin/env bash
cd $CPN_DIR

PULL=$(git pull)
VERSION=$(cpn -v)
PULL=$(git pull)


if test $PULL == "Already up to date!"
if test "$PULL" == "Already up to date."
then
echo "the system is already up to date"
echo $PULL
echo
else
git pull
bash $CPN_DIR/src/help.sh
fi

if test "$PULL" != "Already up to date."
then
sudo chmod 733 cpn.sh
sudo chmod 733 ./src/init.sh
sudo chmod 733 ./src/options.sh
Expand All @@ -29,13 +32,17 @@ else

NEW_VERSION=$(cpn -v)

if test $VERSION != $NEW_VERSION
if test "$VERSION" != "$NEW_VERSION"
then
echo "Update successfully!"
echo
else
echo "Update error contact support"
echo
bash $CPN_DIR/src/help.sh
fi

bash $CPN_DIR/src/help.sh
fi
if test "$VERSION" == "$NEW_VERSION"
then
echo "==> No updated <=="
echo
bash $CPN_DIR/src/help.sh
fi
fi
2 changes: 1 addition & 1 deletion src/version.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "1.2.4"
echo "1.3.0"

0 comments on commit 021e24c

Please sign in to comment.