File tree 2 files changed +24
-3
lines changed
2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ PADD (formerly Chronometer2) is a more expansive version of the original chronom
27
27
``` bash
28
28
sudo chmod +x padd.sh
29
29
```
30
+ ### Dependencies
31
+ - curl
32
+ - jq
33
+ - dig
34
+ - tput
30
35
31
36
## Using PADD
32
37
Original file line number Diff line number Diff line change @@ -1516,15 +1516,31 @@ secretRead() {
1516
1516
}
1517
1517
1518
1518
check_dependencies () {
1519
+ local hasDeps=true
1519
1520
# Check for required dependencies
1520
1521
if ! command -v curl > /dev/null 2>&1 ; then
1521
1522
printf " %b" " ${check_box_bad} Error!\n 'curl' is missing but required.\n"
1522
- exit 1
1523
+ hasDeps=false
1523
1524
fi
1524
1525
1525
1526
if ! command -v jq > /dev/null 2>&1 ; then
1526
- printf " %b" " ${check_box_bad} Error!\n 'jq' is missing but required.\n"
1527
- exit 1
1527
+ printf " %b" " ${check_box_bad} Error!\n 'jq' is missing but required.\n"
1528
+ hasDeps=false
1529
+ fi
1530
+
1531
+ if ! command -v dig > /dev/null 2>&1 ; then
1532
+ printf " %b" " ${check_box_bad} Error!\n 'dig' is missing but required.\n"
1533
+ hasDeps=false
1534
+ fi
1535
+
1536
+ if ! command -v tput > /dev/null 2>&1 ; then
1537
+ printf " %b" " ${check_box_bad} Error!\n 'tput' is missing but required.\n"
1538
+ hasDeps=false
1539
+ fi
1540
+
1541
+ if ! [ " ${hasDeps} " = true ]; then
1542
+ printf " %b" " \n Please install the missing dependencies noted above.\n"
1543
+ exit 1
1528
1544
fi
1529
1545
}
1530
1546
You can’t perform that action at this time.
0 commit comments