mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
tools
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# Set DEBUG environment variable
|
||||
export DEBUG=true
|
||||
|
||||
# Build classpath from lib and library directories
|
||||
CLASSPATH=""
|
||||
for jar in "$SCRIPT_DIR/../lib"/*.jar "$SCRIPT_DIR/../library"/*.jar; do
|
||||
if [ -f "$jar" ]; then
|
||||
CLASSPATH="$CLASSPATH:$jar"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove leading colon
|
||||
CLASSPATH="${CLASSPATH#:}"
|
||||
|
||||
# Run the VersionReader class
|
||||
java -cp "$CLASSPATH" org.diylc.utils.VersionReader "$SCRIPT_DIR/../"
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# FTP settings
|
||||
FTP_USER="diylc_deploy@diy-fever.com"
|
||||
FTP_HOST="ftp.diy-fever.com"
|
||||
|
||||
# Check if password is set
|
||||
if [ -z "$DIYLC_DEPLOY_PWD" ]; then
|
||||
echo "Error: DIYLC_DEPLOY_PWD environment variable is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Source file path
|
||||
SOURCE_FILE="$SCRIPT_DIR/../../diylc-core/src/main/resources/update.xml"
|
||||
|
||||
# Check if source file exists
|
||||
if [ ! -f "$SOURCE_FILE" ]; then
|
||||
echo "Error: update.xml not found at $SOURCE_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload using FTP
|
||||
echo "Uploading update.xml to $FTP_USER@$FTP_HOST..."
|
||||
ftp -n "$FTP_HOST" << EOF
|
||||
user $FTP_USER $DIYLC_DEPLOY_PWD
|
||||
binary
|
||||
put "$SOURCE_FILE" update.xml
|
||||
quit
|
||||
EOF
|
||||
|
||||
# Check FTP exit status
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Upload successful"
|
||||
else
|
||||
echo "Upload failed"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user