summaryrefslogtreecommitdiff
path: root/scripts/progress-indicator
blob: aa263b36a340481550109f93f72ec8c27a59fc7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Propeller progress indicator
FRAME="A"
PID=$1

touch "/tmp/pi.$PID"
while [ -f "/tmp/pi.$PID" ]; 
do
  case $FRAME in
    A) echo -n -e "\b"
       echo -n '|'
       FRAME=B;;
    B) echo -n -e "\b"
       echo -n '/'
       FRAME=C;;
    C) echo -n -e "\b"
       echo -n '-'
       FRAME=D;;
    D) echo -n -e "\b"
       echo -n '\'
       FRAME=A;;
  esac
  sleep 1
done