Skip to content

Commit

Permalink
Upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffrey-easyesi committed Nov 21, 2015
1 parent 7f6051a commit 57628a5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ts/upgrade.sh
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

0 comments on commit 57628a5

Please sign in to comment.