source: longrun_tests/update-type @ 31a5caba

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 31a5caba was 1241851, checked in by tdelisle <tdelisle@…>, 6 years ago

Moved longrun tests outside of tests folder

  • Property mode set to 100755
File size: 444 bytes
Line 
1#!/bin/bash
2
3if [ "$#" -ne 1 ]
4then
5        echo "illegal number of parameters, must be 1 was $#"
6        exit
7fi
8
9NEW="$(echo $1 | tr a-z A-Z)"
10TYPE_FILE=".type"
11if [ -f "$TYPE_FILE" ]
12then
13        OLD="$(cat $TYPE_FILE | tr a-z A-Z)"
14        if [ $OLD == $NEW ]
15        then
16                echo > /dev/null
17                # echo "$TYPE_FILE stayed unchanged"
18        else
19                echo "$NEW" > "$TYPE_FILE"
20                # echo "$TYPE_FILE changed from '$OLD' to '$NEW'"
21        fi
22else
23        echo "$NEW" > "$TYPE_FILE"
24fi
25echo "$TYPE_FILE"
Note: See TracBrowser for help on using the repository browser.