add download_filemanager
This commit is contained in:
@@ -15,7 +15,6 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install 14
|
||||
|
||||
|
||||
# Update and install Composer dependencies
|
||||
composer update
|
||||
composer install
|
||||
|
||||
28
docker/download_filemanager.sh
Normal file
28
docker/download_filemanager.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the base URL and the token
|
||||
TOKEN="glpat-7dM-zghnyabwY6cJyuhw"
|
||||
PROJECT_ID="47"
|
||||
PACKAGE_NAME="filemanager"
|
||||
OUTPUT_FILE="$PACKAGE_NAME.tar.gz"
|
||||
VERSION=$1
|
||||
|
||||
# Construct the URL
|
||||
URL="https://gitlab.luranasoft.com/api/v4/projects/$PROJECT_ID/packages/generic/filemanager/$VERSION/$PACKAGE_NAME-$VERSION.tar.gz"
|
||||
|
||||
# Download the file using curl
|
||||
echo "Download $OUTPUT_FILE from $URL"
|
||||
curl --header "PRIVATE-TOKEN: $TOKEN" "$URL" --output "$OUTPUT_FILE"
|
||||
|
||||
ls -lhs $OUTPUT_FILE
|
||||
|
||||
# Check if the download was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Download completed successfully."
|
||||
|
||||
mkdir -p workflow/public_html/fileManager
|
||||
tar -xzf filemanager.tar.gz -C workflow/public_html/fileManager
|
||||
ls -lhs workflow/public_html/fileManager
|
||||
else
|
||||
echo "Failed to download $OUTPUT_FILE. Please check the version number and try again."
|
||||
fi
|
||||
Reference in New Issue
Block a user