Last active
October 17, 2016 05:39
-
-
Save cheshirecode/dacf4522bf2a14cf778c4451b8e8a586 to your computer and use it in GitHub Desktop.
(DO NOT modify) Fix babylon version to 6.11.2 in yarn.lock file for Yarn
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
#! /bin/bash | |
IFS='%' | |
if [ -f yarn.lock ] | |
then | |
n=`grep -n 'babylon@^6.0.18' yarn.lock | cut -d: -f 1` | |
while read line;do | |
if((i==n));then | |
echo ' version "6.11.2"' | |
elif((i==n+1));then | |
echo ' resolved "https://registry.npmjs.org/babylon/-/babylon-6.11.2.tgz"' | |
else | |
echo "$line" | |
fi | |
((i++)) | |
done < yarn.lock > yarn1.lock | |
mv yarn1.lock yarn.lock | |
fi | |
unset IFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment