-
Notifications
You must be signed in to change notification settings - Fork 71
/
.complete
executable file
·35 lines (28 loc) · 951 Bytes
/
.complete
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
MYPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
LOGO=${MYPATH}/logo.png
cat <<EOF >${MYPATH}/boot.txt
Build-a-Pi Build Complete.
If you found this script helpful
consider a donation to encourage
future development.
https://paypal.me/km4ack
73, de KM4ACK
EOF
OUT=$(yad --width=550 --height=300 --text-align=center --center --title="Build-a-Pi" --show-uri \
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
--text-info \
--button="CLOSE":2 <${MYPATH}/boot.txt \
>/dev/null 2>&1)
BUT=$?
if [ $BUT = 252 ]; then
rm ${MYPATH}/boot.txt
crontab -l >${HOME}/Documents/cron.tmp
sed -i 's/@reboot\ sleep\ 10.*//' ${HOME}/Documents/cron.tmp
crontab ${HOME}/Documents/cron.tmp
exit
fi
rm ${MYPATH}/boot.txt
crontab -l >${HOME}/Documents/cron.tmp
sed -i 's/@reboot\ sleep\ 10.*//' ${HOME}/Documents/cron.tmp
crontab ${HOME}/Documents/cron.tmp