-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f6051a
commit 57628a5
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
if [ $# != 2 ] | ||
then | ||
echo Upgrade to a new version of TypeScript and apply local changes. | ||
echo Usage: $0 old_version new_version | ||
exit | ||
fi | ||
OLDSRC=~/TypeScript-$1/src | ||
NEWSRC=~/TypeScript-$2/src | ||
for dir in "$OLDSRC" "$NEWSRC" | ||
do | ||
if [ ! -d "$dir" ] | ||
then | ||
echo "$dir" is not a directory | ||
exit | ||
fi | ||
done | ||
|
||
diff -ru "$OLDSRC" . > diffs.tmp | ||
find compiler services -type f -exec cp "$NEWSRC/{}" {} \; | ||
patch --no-backup-if-mismatch -p1 -i diffs.tmp | ||
rm diffs.tmp |