sync
This commit is contained in:
parent
b940ba4852
commit
3439112aa1
@ -8,8 +8,8 @@ git push
|
|||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
clear
|
clear
|
||||||
# Update if file changed 10 seconds ago
|
# Update if file changed 5 seconds ago
|
||||||
last_changed=$(find . -newermt "10 seconds ago" | grep -v .git)
|
last_changed=$(find . -newermt "5 seconds ago" | grep -v .git)
|
||||||
if [ "$last_changed" != "" ]; then
|
if [ "$last_changed" != "" ]; then
|
||||||
echo -e "Status: \e[31mnot synced\e[0m"
|
echo -e "Status: \e[31mnot synced\e[0m"
|
||||||
read -p "Press any key to sync."
|
read -p "Press any key to sync."
|
||||||
@ -18,7 +18,7 @@ if [ "$last_changed" != "" ]; then
|
|||||||
git push
|
git push
|
||||||
clear
|
clear
|
||||||
echo -e "Status: \e[33msleep...\e[0m"
|
echo -e "Status: \e[33msleep...\e[0m"
|
||||||
sleep 10
|
sleep 5
|
||||||
else
|
else
|
||||||
echo -e "Status: \e[32msynced\e[0m"
|
echo -e "Status: \e[32msynced\e[0m"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user