Skip to content

Commit

Permalink
0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pavroo committed Apr 3, 2018
1 parent d03f69b commit a5827b7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 38 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------------------
Version 0.1.2 (2018-03-29)
-------------------------------------------------------------------------------
* Changed sparky-xterm settings

-------------------------------------------------------------------------------
Version 0.1.1 (2018-02-19)
-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ca-certificates
coreutils
grep
sparky-remsu
sparky-xterm
sparky-xterm (>= 0.2.0)
wget
yad

Expand Down
72 changes: 35 additions & 37 deletions bin/sparky-ca
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash
#
# Created by Paweł "pavroo" Pijanowski 2018/02/17
# Copyright 2018 under the GNU GPL2 License
# Last update 2018/02/19
#
# This script requires yad to run
# Created by Paweł "pavroo" Pijanowski 2018/02/17
# Copyright 2018 under the GNU GPL2 License
# This script requires yad to run
# Last update 2018/03/29

# get default's locale file
DEFLOCDIR="/usr/share/sparky/sparky-ca"
Expand All @@ -18,7 +17,7 @@ fi

testroot="`whoami`"
if [ "$testroot" != "root" ]; then
echo "Must be root...Exiting"
echo "Must be root... Exiting..."
exit 1
fi

Expand All @@ -31,13 +30,12 @@ OKEXIT="--button=Ok:0 --button=$LOCAL3:1"
YESNO="--button=$LOCAL13:0 --button=$LOCAL14:1"
MSGBOX="--button=Ok:0"
TITLETEXT="$LOCAL4"

if [ -f /usr/bin/sparky-terminal ]; then
SPARKYXTERM="sparky-terminal"
if [ -f /usr/bin/sparky-xterm ];then
SPARKYXTERM="/usr/bin/sparky-xterm"
else
SPARKYXTERM="x-terminal-emulator"
echo "sparky-xterm is missing... Exiting..."
exit 1
fi

CADIR="/usr/local/share/ca-certificates"
CABRDIR="ICP-Brazil"
if [ ! -d $CADIR/$CABRDIR ]; then
Expand Down Expand Up @@ -103,33 +101,33 @@ if [ -f $BRCA1 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA1 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA1
$SPARKYXTERM -e "wget $BRSERVER1/$BRCA1"
$SPARKYXTERM "wget $BRSERVER1/$BRCA1"
fi
else
$SPARKYXTERM -e "wget $BRSERVER1/$BRCA1"
$SPARKYXTERM "wget $BRSERVER1/$BRCA1"
fi

if [ -f $BRCA2 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA2 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA2
$SPARKYXTERM -e "wget $BRSERVER1/$BRCA2"
$SPARKYXTERM "wget $BRSERVER1/$BRCA2"
fi
else
$SPARKYXTERM -e "wget $BRSERVER1/$BRCA2"
$SPARKYXTERM "wget $BRSERVER1/$BRCA2"
fi

if [ -f $BRCA3 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA3 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA3
$SPARKYXTERM -e "wget $BRSERVER1/$BRCA3"
$SPARKYXTERM "wget $BRSERVER1/$BRCA3"
fi
else
$SPARKYXTERM -e "wget $BRSERVER1/$BRCA3"
$SPARKYXTERM "wget $BRSERVER1/$BRCA3"
fi

$SPARKYXTERM -e "update-ca-certificates"
$SPARKYXTERM "update-ca-certificates"

if [ -f $BRCA1 ]; then
BRCA1CHECK=$BRCA1
Expand All @@ -156,33 +154,33 @@ if [ -f $BRCA4 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA4 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA4
$SPARKYXTERM -e "wget $BRSERVER2/v1/p/$BRCA4"
$SPARKYXTERM "wget $BRSERVER2/v1/p/$BRCA4"
fi
else
$SPARKYXTERM -e "wget $BRSERVER2/v1/p/$BRCA4"
$SPARKYXTERM "wget $BRSERVER2/v1/p/$BRCA4"
fi

if [ -f $BRCA5 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA5 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA5
$SPARKYXTERM -e "wget $BRSERVER2/v2/p/$BRCA5"
$SPARKYXTERM "wget $BRSERVER2/v2/p/$BRCA5"
fi
else
$SPARKYXTERM -e "wget $BRSERVER2/v2/p/$BRCA5"
$SPARKYXTERM "wget $BRSERVER2/v2/p/$BRCA5"
fi

if [ -f $BRCA6 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA6 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA6
$SPARKYXTERM -e "wget $BRSERVER2/v5/p/$BRCA6"
$SPARKYXTERM "wget $BRSERVER2/v5/p/$BRCA6"
fi
else
$SPARKYXTERM -e "wget $BRSERVER2/v5/p/$BRCA6"
$SPARKYXTERM "wget $BRSERVER2/v5/p/$BRCA6"
fi

$SPARKYXTERM -e "update-ca-certificates"
$SPARKYXTERM "update-ca-certificates"

if [ -f $BRCA4 ]; then
BRCA4CHECK=$BRCA4
Expand All @@ -209,23 +207,23 @@ if [ -f $BRCA7 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA7 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA7
$SPARKYXTERM -e "wget $BRSERVER3/v2/$BRCA7"
$SPARKYXTERM "wget $BRSERVER3/v2/$BRCA7"
fi
else
$SPARKYXTERM -e "wget $BRSERVER3/v2/$BRCA7"
$SPARKYXTERM "wget $BRSERVER3/v2/$BRCA7"
fi

if [ -f $BRCA8 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA8 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA8
$SPARKYXTERM -e "wget $BRSERVER3/v5/$BRCA8"
$SPARKYXTERM "wget $BRSERVER3/v5/$BRCA8"
fi
else
$SPARKYXTERM -e "wget $BRSERVER3/v5/$BRCA8"
$SPARKYXTERM "wget $BRSERVER3/v5/$BRCA8"
fi

$SPARKYXTERM -e "update-ca-certificates"
$SPARKYXTERM "update-ca-certificates"

if [ -f $BRCA7 ]; then
BRCA7CHECK=$BRCA7
Expand All @@ -247,33 +245,33 @@ if [ -f $BRCA9 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA9 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA9
$SPARKYXTERM -e "wget $BRSERVER4/v1/p/$BRCA9"
$SPARKYXTERM "wget $BRSERVER4/v1/p/$BRCA9"
fi
else
$SPARKYXTERM -e "wget $BRSERVER4/v1/p/$BRCA9"
$SPARKYXTERM "wget $BRSERVER4/v1/p/$BRCA9"
fi

if [ -f $BRCA2 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA10 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA10
$SPARKYXTERM -e "wget $BRSERVER4/v1/p/$BRCA10"
$SPARKYXTERM "wget $BRSERVER4/v1/p/$BRCA10"
fi
else
$SPARKYXTERM -e "wget $BRSERVER4/v1/p/$BRCA10"
$SPARKYXTERM "wget $BRSERVER4/v1/p/$BRCA10"
fi

if [ -f $BRCA3 ]; then
$DIALOG4 $TITLE"$TITLETEXT" $YESNO $TEXT"\n$BRCA11 $LOCAL11\n$LOCAL12"
if [ "$?" = "0" ]; then
rm -f $BRCA11
$SPARKYXTERM -e "wget $BRSERVER4/v1/p/$BRCA11"
$SPARKYXTERM "wget $BRSERVER4/v1/p/$BRCA11"
fi
else
$SPARKYXTERM -e "wget $BRSERVER4/v1/p/$BRCA11"
$SPARKYXTERM "wget $BRSERVER4/v1/p/$BRCA11"
fi

$SPARKYXTERM -e "update-ca-certificates"
$SPARKYXTERM "update-ca-certificates"

if [ -f $BRCA9 ]; then
BRCA9CHECK=$BRCA9
Expand Down

0 comments on commit a5827b7

Please sign in to comment.