<commit_before>#!/bin/bash
#
# Installation script for app-env-docker repository
# https://github.com/baidu-security/app-env-docker

set -x
cd /tmp

function InstallJava()
{
	path=$1

	curl https://packages.baidu.com/app/openrasp/rasp-java.tar.gz -O rasp-java.tar.gz
	tar -xvf rasp-java.tar.gz
	
	cd rasp-*
	java -jar RaspInstall.jar "$path"
	rm -rf rasp*
}

function InstallPHP()
{
	curl https://packages.baidu.com/app/openrasp/rasp-php.tar.bz2 -O rasp-php.tar.bz2
	tar -xvf rasp-php.tar.bz2
	
	php rasp-*/install.php -d /opt/rasp/
	rm -rf rasp*
}

if [[ -d /tomcat/ ]]; then
	InstallJava /tomcat/
	/etc/init.d/tomcat.sh restart
fi

if [[ -d /jboss/ ]]; then
	InstallJava /jboss/
	/etc/init.d/jboss.sh restart
fi

if [[ -x /usr/bin/php ]]; then
	InstallPHP
	/etc/init.d/httpd.sh restart
fi
<commit_msg>Let us release that way<commit_after>#!/bin/bash
#
# Installation script for app-env-docker repository
# https://github.com/baidu-security/app-env-docker

set -x
cd /tmp

function InstallJava()
{
	path=$1

	curl https://packages.baidu.com/app/openrasp/rasp-java.tar.gz -O rasp-java.tar.gz
	tar -xvf rasp-java.tar.gz
	
	cd rasp-*
	java -jar RaspInstall.jar "$path"
	rm -rf rasp*
}

function InstallSpringBoot()
{
	curl https://packages.baidu.com/app/openrasp/rasp-java.tar.gz -O rasp-java.tar.gz
	tar -xvf rasp-java.tar.gz

	rm -rf /rasp
	mv rasp-*/rasp /rasp
}

function InstallPHP()
{
	curl https://packages.baidu.com/app/openrasp/rasp-php.tar.bz2 -O rasp-php.tar.bz2
	tar -xvf rasp-php.tar.bz2
	
	php rasp-*/install.php -d /opt/rasp/
	rm -rf rasp*
}

if [[ -d /tomcat/ ]]; then
	InstallJava /tomcat/
	/etc/init.d/tomcat.sh restart
fi

if [[ -d /jboss/ ]]; then
	InstallJava /jboss/
	/etc/init.d/jboss.sh restart
fi

if [[ -d /root/springboot.jar ]]; then
	InstallSpringBoot
fi

if [[ -x /usr/bin/php ]]; then
	InstallPHP
	/etc/init.d/httpd.sh restart
fi

{'fraction_non_alphanumeric': 0.16460462614308768, 'fraction_numerical': 0.004303388918773534, 'mean_word_length': 2.949044585987261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7238865', 'n_tokens_mistral': 844, 'n_tokens_neox': 805, 'n_words': 169}