Skip to content

Commit 8f975f8

Browse files
authored
update flatgraph (#1785)
also make updateDependencies.sh compatible with non-GNU sed variants
1 parent af84a5e commit 8f975f8

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name := "codepropertygraph"
22

33
// parsed by project/Versions.scala, updated by updateDependencies.sh
4-
val flatgraphVersion = "0.0.87"
4+
val flatgraphVersion = "0.0.88"
55

66
inThisBuild(
77
List(

updateDependencies.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ check_installed() {
99
fi
1010
}
1111

12+
function sedi() {
13+
if sed --version 2> /dev/null | grep -q 'GNU' ; then
14+
# GNU sed does not like a second argument for -i
15+
sed -i "$@"
16+
else
17+
# but macOS (FreeBSD) sed needs it
18+
sed -i '' "$@"
19+
fi
20+
}
21+
1222
check_installed curl
1323

1424
# check if xmllint is installed
@@ -57,13 +67,13 @@ function update {
5767
if [ "$NON_INTERACTIVE_OPTION" == "--non-interactive" ]
5868
then
5969
echo "non-interactive mode, auto-updating $NAME: $OLD_VERSION -> $VERSION"
60-
sed -i "s/$SEARCH/$REPLACE/" build.sbt
70+
sedi "s/$SEARCH/$REPLACE/" build.sbt
6171
else
6272
echo "update $NAME: $OLD_VERSION -> $VERSION? [Y/n]"
6373
read ANSWER
6474
if [ -z $ANSWER ] || [ "y" == $ANSWER ] || [ "Y" == $ANSWER ]
6575
then
66-
sed -i "s/$SEARCH/$REPLACE/" build.sbt
76+
sedi "s/$SEARCH/$REPLACE/" build.sbt
6777
fi
6878
fi
6979
fi

0 commit comments

Comments
 (0)