-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.sh
executable file
·34 lines (33 loc) · 932 Bytes
/
main.sh
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
#!/bin/bash
g++ check.cpp -o check && ./check
clear
echo -e '\033[38;5;2m'
echo "You can config more in ./custom folder"
echo -e '\033[38;5;159m'
config_time=`cat ./custom/time.txt`
created=""
if [ "$config_time" == "minutes" ]; then
echo "Please enter a time for timer please : (minutes)"
read time
echo $time >> time_minutes.txt
created="minutes"
elif [ "$config_time" == "seconds" ]; then
echo "Please enter a time for timer please: (seconds)"
read time
echo $time >> time_seconds.txt
created="seconds"
elif [ "$config_time" == "hours" ]; then
echo "Please enter a time for timer please: (hours)"
read time
echo $time >> time_hours.txt
created="hours"
else
echo "Please enter a time for timer please: (minutes)"
read time
echo $time >> time_minutes.txt
created="minutes"
fi
clear
echo "$time $config_time"
g++ timer.cpp -o timer && ./timer
rm "time_$created.txt"