Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide script to help upgrade embedded copy of ASM #68

Merged
merged 1 commit into from
Nov 13, 2022
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\[email protected]@" \
$f > ${DST}/`basename $f`
done

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