source: tests/preempt_longrun/update-type @ 2e041e27

ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 2e041e27 was bf71cfd, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Moved up many directories in source

  • 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.