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 @@ -1517,15 +1517,31 @@ secretRead() {
1517
1517
}
1518
1518
1519
1519
check_dependencies () {
1520
+ local hasDeps=true
1520
1521
# Check for required dependencies
1521
1522
if ! command -v curl > /dev/null 2>&1 ; then
1522
1523
printf " %b" " ${check_box_bad} Error!\n 'curl' is missing but required.\n"
1523
- exit 1
1524
+ hasDeps=false
1524
1525
fi
1525
1526
1526
1527
if ! command -v jq > /dev/null 2>&1 ; then
1527
- printf " %b" " ${check_box_bad} Error!\n 'jq' is missing but required.\n"
1528
- exit 1
1528
+ printf " %b" " ${check_box_bad} Error!\n 'jq' is missing but required.\n"
1529
+ hasDeps=false
1530
+ fi
1531
+
1532
+ if ! command -v dig > /dev/null 2>&1 ; then
1533
+ printf " %b" " ${check_box_bad} Error!\n 'dig' is missing but required.\n"
1534
+ hasDeps=false
1535
+ fi
1536
+
1537
+ if ! command -v tput > /dev/null 2>&1 ; then
1538
+ printf " %b" " ${check_box_bad} Error!\n 'tput' is missing but required.\n"
1539
+ hasDeps=false
1540
+ fi
1541
+
1542
+ if ! [ " ${hasDeps} " = true ]; then
1543
+ printf " %b" " \n Please install the missing dependencies noted above.\n"
1544
+ exit 1
1529
1545
fi
1530
1546
}
1531
1547
You can’t perform that action at this time.
0 commit comments