Skip to content

Commit

Permalink
added vineflower
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav-Povolotsky committed Oct 27, 2024
1 parent 5b229ea commit 674b85e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions scripts/installation/15.vineflower.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

pkg=vineflower
PKG=VINEFLOWER

#target_install_path=$PWD/installed
pkg_path=$target_install_path/usr/local/$pkg
bin_path=$target_install_path/usr/local/bin
pkg_info=$pkg_path/$pkg.software_version.txt

mkdir -p $pkg_path $bin_path
python3 helpers/get-release-info.py https://github.com/Vineflower/vineflower -fan '^vineflower-[\d.]+.jar$' -o $pkg_info
fname=`head -n 3 $pkg_info | tail -n 1`
url=`head -n 4 $pkg_info | tail -n 1`
echo "File: $fname; Url: $url"

pushd $pkg_path
curl -L -o $fname $url
popd

exec_script=$pkg_path/$pkg
cp helpers/template-java-runner.sh $exec_script
sed -i "s/\/template/\/$fname/" $exec_script
sed -i "s/template/$pkg/g" $exec_script
sed -i "s/TEMPLATE/$PKG/g" $exec_script
chmod 0755 $exec_script
ln -s ../$pkg/$pkg $bin_path/$pkg

# Checking it can be runned
# Command returns errorcode 2 on help/version commands
$bin_path/$pkg -h || if [ $? -ne 2 ]; then exit 1; fi

0 comments on commit 674b85e

Please sign in to comment.