Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions bin/update_asm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#*******************************************************************************
# Copyright (c) 2022-present Sonatype, Inc. and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Stuart McCulloch - initial API and implementation
#*******************************************************************************
#!/bin/sh
set -e

TAG=$1

if [[ ! "${TAG}" =~ ^ASM_[0-9A-Z_]+$ ]]
then
echo "Usage: update_asm.sh <tag>"
exit 1
fi

SRC=asm-${TAG}/asm/src/main/java/org/objectweb/asm
DST=org.eclipse.sisu.inject/src/org/eclipse/sisu/space/asm/

rm ${DST}/*.java
curl -s https://gitlab.ow2.org/asm/asm/-/archive/${TAG}/asm-${TAG}.zip | jar x ${SRC}

for f in ${SRC}/*.java
do
sed -e "s@org/objectweb/asm@org/eclipse/sisu/space/asm@" \
-e "s@org\.objectweb\.asm@org.eclipse.sisu.space.asm@" \
$f > ${DST}/`basename $f`
done

rm -r ${SRC}/*
rmdir -p ${SRC}