### Complete Installer Setup Script Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md A comprehensive bash script to build an application and create a self-extracting archive using makeself. It includes versioning, custom compression, checksums, and license handling. ```sh #!/bin/bash # create-installer.sh set -e VERSION="1.0.0" APP_NAME="myapp" OUTFILE="${APP_NAME}-${VERSION}.run" # Build application echo "Building..." mkdir -p build/package cp -r src/* build/package/ cp LICENSE.txt build/package/ # Create installer echo "Creating self-extracting archive..." ./makeself.sh \ --gzip \ --sha256 \ --complevel 9 \ --license LICENSE.txt \ --tar-extra "--exclude=.git --exclude=.env" \ build/package \ "$OUTFILE" \ "$APP_NAME v$VERSION" \ ./install.sh echo "✓ Created: $OUTFILE" ls -lh "$OUTFILE" ``` -------------------------------- ### Persistent Installation Configuration Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Example of makeself configuration for persistent installations, specifying a target directory and file ownership. ```shell makeself.sh \ --gzip \ --target /opt/myapp \ --chown \ --sha256 \ --preextract ./check-deps.sh \ --cleanup ./remove-temps.sh \ ./myapp \ install.run \ "MyApp v1.0 Installation" \ ./setup.sh ``` -------------------------------- ### Minimal Archive Execution Example Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md This minimal example demonstrates setting up label, script, and script arguments, then extracting and executing the archive, followed by cleanup. ```sh #!/bin/sh # Generated archive header . "$HEADER" # ... configuration from makeself.sh ... label="MyApp" script="./install.sh" scriptargs="" # Extract and execute tmpdir=$(mktemp -d) trap "MS_cleanup" SIGTERM SIGINT tail -n +$skip "$0" | MS_Decompress | UnTAR eval "$script" $scriptargs rm -rf "$tmpdir" exit 0 ``` -------------------------------- ### Minimal User Installation Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md The simplest way to install an archive. The user just downloads and runs it, accepting all defaults. ```sh ./myapp.run ``` -------------------------------- ### CD/Offline Installation Configuration Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Example of makeself configuration for CD or offline installations, disabling temporary extraction and X11. ```shell makeself.sh \ --copy \ --notemp \ --nox11 \ --gzip \ ./myapp \ myapp.run \ "MyApp Installation (CD-Based)" \ ./offline-install.sh ``` -------------------------------- ### Complete Execution Flow Example Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md This example outlines the complete execution flow for a makeself archive, including initialization, pre-extraction, extraction, verification, execution, and cleanup steps. ```sh # 1. Initialize MS_PrintLicense # If license embedded MS_diskspace "$targetdir" # Verify space # 2. Pre-extract MS_Preextract # 3. Extract tail -n +$skip "$0" | MS_dd_Progress "$0" "$offset" "$totalsize" | \ MS_Decompress | UnTAR v # 4. Verify MS_Check "$0" y # 5. Execute eval "$script" $scriptargs # 6. Cleanup MS_exec_cleanup MS_cleanup ``` -------------------------------- ### Install Makeself Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Clone the repository and run the makeself.sh script directly. No external dependencies are required. ```sh git clone https://github.com/megastep/makeself.git cd makeself ./makeself.sh --version ``` -------------------------------- ### Create Target Directory Installation Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Generates a self-extracting archive that installs the application to a specified target directory, allows changing ownership, and includes a license file. This is ideal for system-wide installations. ```shell makeself.sh \ --target /opt/myapp \ --chown \ --license LICENSE.txt \ ./myapp \ install.run \ "MyApp v1.0" \ ./setup.sh arg1 arg2 ``` -------------------------------- ### Enterprise Deployment Script Example Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md An example bash script for integrating makeself archives into a larger corporate deployment workflow, including signature verification and disk space checks. ```bash #!/bin/bash # Corporate deployment script ARCHIVE="myapp-1.0.run" INSTALL_DIR="/opt/corporate/myapp" LOG_FILE="/var/log/deployments/myapp.log" log() { echo "$(date '+%Y-%m-%d %H:%M:%S') - $* ``` ```bash } # Verify signature log "Verifying archive signature..." "$ARCHIVE" --verify-sig "0xCORPKEY123" || { log "Signature verification failed!" exit 1 } # Check disk space log "Checking disk space..." available_kb=$(df "$INSTALL_DIR" | tail -1 | awk '{print $4}') required_kb=$((2000000)) # 2GB if [ "$available_kb" -lt "$required_kb" ]; then log "Insufficient disk space: ${available_kb}KB available, ${required_kb}KB required" exit 1 fi # Deploy log "Extracting archive..." "$ARCHIVE" --quiet --accept --target "$INSTALL_DIR" || { log "Archive extraction failed!" exit 1 } log "Installation successful" exit 0 ``` -------------------------------- ### Build System Integration (Makefiles) Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Example Makefile demonstrating how to integrate makeself archive creation into a build process, specifying compression, checksums, and license. ```makefile MAKESELF = makeself.sh ARCHIVE = dist/myapp-$(VERSION).run SOURCE_DIR = build/package $(ARCHIVE): $(SOURCE_DIR) CHANGELOG.md LICENSE.txt @echo "Building self-extracting archive..." $(MAKESELF) \ --gzip \ --complevel 9 \ --sha256 \ --license LICENSE.txt \ --tar-extra "--exclude=.git" \ --quiet \ $(SOURCE_DIR) \ $(ARCHIVE) \ "MyApp $(VERSION)" \ ./install.sh .PHONY: dist dist: $(ARCHIVE) ``` -------------------------------- ### Create Archive with Target Installation Path Source: https://github.com/megastep/makeself/blob/master/_autodocs/MANIFEST.txt This command creates an archive that, when executed, will install its contents to a specified target directory, with options to set ownership. ```bash makeself.sh --target /opt/myapp --chown mydir install.run "Label" ./setup.sh ``` -------------------------------- ### Minimal Professional Release Configuration Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Example of a basic makeself configuration for a professional release using gzip compression and SHA256 checksum. ```shell makeself.sh \ --gzip \ --sha256 \ --license LICENSE.txt \ ./myapp \ myapp-1.0.run \ "MyApp v1.0" \ ./install.sh ``` -------------------------------- ### Fast Parallel Compression Configuration Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Example of makeself configuration for fast parallel compression using pbzip2 and multiple threads. ```shell makeself.sh \ --pbzip2 \ --complevel 6 \ --threads 8 \ --sha256 \ --tar-extra "--exclude=build" \ ./myapp \ myapp-fast.bz2.run \ "MyApp v1.0" \ ./install.sh ``` -------------------------------- ### Create Simple Installer Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Generates a basic self-extracting archive for an application. This is the most straightforward way to package an application for distribution. ```shell makeself.sh ./myapp myapp.run "MyApp v1.0" ./install.sh ``` -------------------------------- ### Create Production Archive with Gzip and SHA256 Source: https://github.com/megastep/makeself/blob/master/_autodocs/MANIFEST.txt This example demonstrates creating a production-ready archive using gzip compression and SHA256 checksum for integrity verification. It also includes a license file. ```bash makeself.sh --gzip --sha256 --license LICENSE.txt mydir archive.run "Label" ./install.sh ``` -------------------------------- ### HTTP/Download Compatibility Source: https://github.com/megastep/makeself/blob/master/_autodocs/compatibility.md Provides examples of downloading makeself archives using standard command-line tools like curl and wget. ```sh curl -O https://example.com/myapp.run wget https://example.com/myapp.run ``` -------------------------------- ### Export Configuration Variables Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md This example demonstrates how to export configuration variables to be available in startup and cleanup scripts. It checks the 'export_conf' variable before exporting. ```sh if test "$export_conf" = y; then export label script scriptargs KEEP targetdir fi ``` -------------------------------- ### Interactive Installation Options Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Allows users to review archive contents and metadata before extraction or execution. Useful for enterprise deployments and security-conscious users. ```sh ./myapp.run --list # See what's in archive ``` ```sh ./myapp.run --info # See metadata ``` ```sh ./myapp.run --check # Verify integrity ``` ```sh ./myapp.run --confirm # Prompt before execution ``` -------------------------------- ### Run Archive Commands Source: https://github.com/megastep/makeself/blob/master/_autodocs/MANIFEST.txt These examples demonstrate various ways to execute a created archive, including running it normally, checking its integrity, listing its contents, extracting only, or confirming execution. ```bash ./archive.run ``` ```bash ./archive.run --check ``` ```bash ./archive.run --list ``` ```bash ./archive.run --noexec ``` ```bash ./archive.run --confirm ``` -------------------------------- ### Create Persistent Installation Package Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Build an archive that extracts to a specific location and remains there, ideal for system software or long-term installations. It supports fixed installation directories and persistent cleanup hooks. ```shell makeself.sh \ --target /opt/myapp \ --chown \ --keep \ --nooverwrite \ --gzip \ --preextract ./check-deps.sh \ --cleanup ./cleanup-temps.sh \ ./myapp \ install.run \ "MyApp v1.0 System Installation" \ ./setup.sh arg1 arg2 ``` -------------------------------- ### Create Archive with High Compression using XZ Source: https://github.com/megastep/makeself/blob/master/_autodocs/MANIFEST.txt This example utilizes the XZ compression algorithm with a specified compression level and number of threads for maximum compression efficiency. ```bash makeself.sh --xz --complevel 9 --threads 4 mydir archive.xz.run "Label" ./install.sh ``` -------------------------------- ### CD-based Installer (Copy to Temp First) Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Copies the archive to a temporary directory before extraction, suitable for CD-based installers or scenarios requiring a clean extraction environment. ```sh makeself.sh --copy mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Pre-Extraction Script Example Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md An example of a shell script that can be executed before the archive's contents are extracted. This is useful for performing system checks or initialization tasks. It receives startup script arguments and executes in the temporary extraction directory. ```sh #!/bin/sh # Example pre-extraction script echo "Checking system requirements..." which required-command || exit 1 ``` -------------------------------- ### Cleanup Script for Makeself Archives Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md An example cleanup script that can be embedded within a makeself archive using the --cleanup option. It removes temporary files and logs installation details. ```shell #!/bin/bash # cleanup.sh - Embedded via --cleanup echo "Running cleanup..." # Remove temporary files rm -f /tmp/myapp-*.tmp rm -rf /var/cache/myapp # Collect logs for later analysis if [ -f install.log ]; then gzip -c install.log > /var/log/myapp-install-$(date +%s).log.gz fi # Report status if [ $? -eq 0 ]; then logger "MyApp installation cleanup successful" exit 0 else logger "MyApp installation cleanup failed" exit 1 fi ``` -------------------------------- ### Secure Enterprise Release Configuration Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Example of a secure makeself configuration for enterprise releases, using xz compression, GPG encryption, and signing. ```shell makeself.sh \ --xz \ --complevel 9 \ --gpg-asymmetric-encrypt-sign \ --sign "my-gpg-passphrase" \ --sha256 \ --license LICENSE.txt \ --lsm myapp.lsm \ --tar-extra "--exclude=.git --exclude=.env" \ ./myapp \ myapp-secure.run \ "MyApp v1.0 (Encrypted)" \ ./install.sh ``` -------------------------------- ### Basic Extraction Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Executes the installer archive, which automatically handles file extraction, script execution, and cleanup of the temporary directory upon completion. ```sh ./installer.run # Files extracted, script executed, temporary directory cleaned up ``` -------------------------------- ### Install bzip2 or Use Alternative Compression Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md If you encounter a 'Command not found: bzip2' error, ensure bzip2 is installed on your system or choose an alternative compression method like gzip. ```sh # Install bzip2 apt-get install bzip2 # Debian/Ubuntu brew install bzip2 # macOS yum install bzip2 # RHEL/CentOS # Or use different compressor ./makeself.sh --gzip myapp myapp.run "Label" ./install.sh ``` -------------------------------- ### Check Disk Space Before Installation Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md A shell script snippet to check available disk space before proceeding with an installation. It warns the user if space is below a threshold. ```shell available_kb=$(df . | tail -1 | awk '{print $4}') if [ "$available_kb" -lt 500000 ]; then echo "Warning: Low disk space (${available_kb}KB available)" fi echo "System requirements check passed" exit 0 ``` -------------------------------- ### Cleanup Script Example Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md An example of a shell script that can be used for cleaning up temporary files after an archive has been executed. This script runs after the main startup script completes or if the archive execution is interrupted. ```sh #!/bin/sh # Example cleanup script echo "Cleaning up after MyApp..." rm -f temporary-files ``` -------------------------------- ### Parallel Compression Using All Cores Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Utilize all available CPU cores during archive creation for faster compression. This example uses pbzip2 with threads set to 0 (auto). ```sh # Use all CPU cores during creation ./makeself.sh \ --pbzip2 \ --threads 0 \ myapp myapp.bz2.run "Label" ./install.sh ``` -------------------------------- ### Configure Secure Encrypted Installation Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Sets variables for a secure installation using encryption, enabling license acceptance and cleanup. This is suitable for distributing sensitive software. ```sh decrypt_cmd="openssl enc -aes-256-cbc -d -salt -pbkdf2" accept=y cleanup=y ``` -------------------------------- ### Configure Silent Installation Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Sets variables for a silent installation, disabling prompts and checks. Use this when automated deployment is required without user interaction. ```sh quiet=y accept=y nodiskspace=y ``` -------------------------------- ### Docker Container Base Image Creation with Makeself Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md A Dockerfile example demonstrating how to create a self-extracting archive of a Docker context within a container. It copies the archive, executes it quietly, and then removes the archive. ```dockerfile # Create self-extracting archive of Docker context FROM alpine:latest COPY myapp.run /tmp/ RUN /tmp/myapp.run --quiet && rm /tmp/myapp.run ``` -------------------------------- ### Creating a Self-Extracting Archive Source: https://github.com/megastep/makeself/blob/master/README.md This section describes the basic syntax and provides an example for creating a self-extracting archive using makeself. ```APIDOC ## Creating a Self-Extracting Archive ### Description This command creates a self-extracting archive. ### Method Shell Command ### Endpoint N/A ### Parameters #### Path Parameters - **archive_dir** (string) - Required - The directory containing the files to be archived. - **file_name** (string) - Required - The name of the archive to be created. - **label** (string) - Required - An arbitrary text string describing the package. - **startup_script** (string) - Optional - The command to be executed from within the directory of extracted files. - **script_args** (string) - Optional - Additional arguments for the startup script. ### Request Example ```sh makeself.sh /home/joe/mysoft mysoft.sh "Joe's Nice Software Package" ./setup ``` ### Response N/A ``` -------------------------------- ### Faster Compression with Lower Level Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Use a lower compression level for faster archive creation. This example uses gzip with compression level 6. ```sh # Use lower compression level for speed ./makeself.sh \ --gzip \ --complevel 6 \ myapp myapp.run "Label" ./install.sh ``` -------------------------------- ### Offline/Disconnected Installation Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Handles scenarios where the archive is on removable media or needs to be copied to a temporary location before extraction. Useful for offline deployments. ```sh # During archive creation (if on CD) makeself.sh --copy myapp archive.run "MyApp" ./install.sh ``` ```sh # During execution ./archive.run --keep --nox11 # Archive copies itself to temp before extracting # Allows CD to be ejected and new CD inserted if needed ``` -------------------------------- ### Create Basic Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/INDEX.md Use this command to create a simple self-extracting archive. It requires the directory to archive, the output archive name, a label, and the installation script. ```sh makeself.sh mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Create Production-Quality Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/INDEX.md This command creates a robust archive with gzip compression, SHA256 checksum, and includes a license file. It specifies the source directory, output archive name, application version, and installation script. ```sh makeself.sh \ --gzip \ --sha256 \ --license LICENSE.txt \ ./mydir \ archive.run \ "MyApp v1.0" \ ./install.sh ``` -------------------------------- ### Enable Verbose Output for Archive Execution Source: https://github.com/megastep/makeself/blob/master/_autodocs/errors.md Use the --verbose and --confirm flags when executing an archive to get detailed runtime information. Redirect output to a file. ```sh # Archive execution ./archive.run --verbose --confirm 2>&1 | tee execution.log ``` -------------------------------- ### Build and test project Source: https://github.com/megastep/makeself/blob/master/README.md Standard make commands for building the project and running the test suite. ```makefile make ``` ```makefile make test ``` -------------------------------- ### Select Compression Algorithm for Makeself Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/compatibility.md Choose a compression algorithm for your makeself archive. '--gzip' offers maximum portability. '--bzip2' is recommended for modern systems. '--xz' provides the best compression but is slower. '--pbzip2' is for speed on multi-core systems. ```sh makeself.sh --gzip mydir archive.run "Label" ./install.sh ``` ```sh makeself.sh --bzip2 mydir archive.bz2.run "Label" ./install.sh ``` ```sh makeself.sh --xz --complevel 9 --threads 4 mydir archive.xz.run "Label" ./install.sh ``` ```sh makeself.sh --pbzip2 --threads 8 mydir archive.bz2.run "Label" ./install.sh ``` -------------------------------- ### Get Header Size Source: https://github.com/megastep/makeself/blob/master/_autodocs/errors.md Calculates the approximate size of the makeself archive header in bytes. ```shell SKIP=$(head -n 1 archive.run | wc -c) echo "Header is approximately $SKIP bytes" ``` -------------------------------- ### Makeself Archive Creation Command Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Basic syntax for creating a makeself archive. Specify options, the directory to archive, the output file name, a label, and the startup script. ```sh # Create archive ./makeself.sh [options] directory output-file "label" startup-script [args] ``` -------------------------------- ### Manual Testing Workflow for Makeself Archives Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Demonstrates how to manually test a makeself archive. Includes verifying integrity, listing contents, extracting without execution, and normal execution. ```shell # Create test archive ./makeself.sh ./test-app test.run "Test App" echo "Hello, World!" # Test 1: Verify integrity ./test.run --check echo "Integrity check: $?" # Test 2: List contents ./test.run --list # Test 3: Extract without executing ./test.run --noexec --keep --target /tmp/test-extract ls -la /tmp/test-extract/ # Test 4: Execute normally ./test.run --quiet # Clean up rm -rf /tmp/test-extract test.run ``` -------------------------------- ### Temporary Directory Handling Source: https://github.com/megastep/makeself/blob/master/_autodocs/compatibility.md Shows how makeself archives use $TMPDIR or /tmp for temporary files, and how to specify a custom target directory. ```sh # Use custom temp directory export TMPDIR=/var/tmp ./archive.run # Specify target to avoid /tmp ./archive.run --target /opt/myapp ``` -------------------------------- ### Get Directory Size in Kilobytes Source: https://github.com/megastep/makeself/blob/master/_autodocs/types.md Use `du -ks` to report the size of a directory in kilobytes. Convert to bytes by multiplying by 1024. ```shell du -ks directory # Returns size in KB expr $KB \* 1024 # Convert KB to bytes ``` -------------------------------- ### Print Version Information Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Use --version or -v to display the makeself version and exit the program. ```sh makeself.sh --version # Output: Makeself version 2.7.2 ``` -------------------------------- ### Run a Self-Extracting Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Make the archive executable and run it. Files will be extracted to a temporary directory, the startup script will execute, and temporary files will be cleaned up automatically. ```sh # User downloads and runs it chmod +x myapp.run ./myapp.run ``` -------------------------------- ### Makeself Command-Line Options Source: https://github.com/megastep/makeself/blob/master/README.md Options available when creating a makeself archive. ```APIDOC ## Makeself Command-Line Options ### Description Options that can be used when creating a self-extracting archive with makeself. ### Method Shell Command ### Endpoint N/A ### Parameters #### Path Parameters - **`--cleanup`** : Specify a script that is run when execution is interrupted or finishes successfully. The script is executed with the same environment and initial `script_args` as `startup_script`. - **`--copy`** : Upon extraction, the archive will first extract itself to a temporary directory. This is useful for installers on removable media. - **`--nox11`** : Disable the automatic spawning of a new terminal in X11. - **`--nowait`** : When executed from a new X11 terminal, disable the user prompt at the end of the script execution. - **`--nomd5`** : Disable the creation of a MD5 checksum for the archive. - **`--nocrc`** : Disable the creation of a CRC checksum for the archive. - **`--sha256`** : Adds a SHA256 checksum for the archive. - **`--lsm` _file_** : Provide a Linux Software Map (LSM) file to makeself. - **`--tar-format opt`** : Specify the tar archive format (default is ustar). - **`--tar-extra opt`** : Append more options to the tar command line. - **`--target dir`** : Specify the directory where the archive will be extracted. - **`--keep-umask`** : Keep the umask set to shell default. - **`--packaging-date date`** : Use provided string as the packaging date. - **`--license` _file_** : Append a license file. - **`--nooverwrite`** : Do not extract the archive if the specified target directory already exists. - **`--help-header` _file_** : Add a header to the archive's `--help` output. ### Request Example ```sh makeself.sh --tar-extra "--exclude=.git" --target /tmp/extracted_files src/ myapp.sh "My Application" ./run.sh ``` ### Response N/A ``` -------------------------------- ### Extract Directly to Current Directory Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Extract the archive contents directly into the current directory. This option implies `--notemp` and is useful for in-place installations. ```sh makeself.sh --current mydir archive.run "My App" ./install.sh ``` -------------------------------- ### Extract Only (No Auto-Execution) Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Extracts archive contents without executing the startup script, allowing manual inspection or execution. Useful for debugging and custom installations. ```sh ./myapp.run --noexec --keep --target /opt/myapp # ... review /opt/myapp contents ... cd /opt/myapp && ./install.sh --manual-mode ``` -------------------------------- ### MS_Help Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md Displays a help message detailing all supported options and environment variables for archive usage. This function is typically invoked with a `--help` flag. ```APIDOC ## MS_Help ### Description Display help message for archive usage. ### Method Shell Function ### Parameters None ### Return Prints to stderr ### Behavior Lists all supported options and environment variables ### Request Example ```sh ./archive.run --help ``` ``` -------------------------------- ### Gzip and Parallel XZ Compression Settings Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Configure compression algorithms and levels for archive creation. Use 'gzip' for standard compression or 'xz' with threading for parallel compression. ```sh # Gzip compression COMPRESS=gzip COMPRESS_LEVEL=9 GZIP_CMD="gzip -c9" GUNZIP_CMD="gzip -cd" # Parallel xz COMPRESS=xz THREADS=4 GZIP_CMD="xz -c9 --threads=4" GUNZIP_CMD="xz -d" ``` -------------------------------- ### MS_dd Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md Extracts a specified number of raw bytes from an archive file starting at a given offset. This function is a cross-platform compatible wrapper for the `dd` command. ```APIDOC ## MS_dd ### Description Extract raw bytes from archive file. ### Method Shell Function ### Parameters #### Path Parameters - **input_file** (path) - Required - Archive file to read from - **offset** (int) - Required - Starting offset in bytes - **length** (int) - Required - Number of bytes to extract ### Return Raw bytes output to stdout ### Behavior - Handles both `dd` with ibs/obs and basic bs mode - Tests for `fullblock` flag support - Cross-platform compatible (BSD/GNU dd) ### Request Example ```sh MS_dd "$archname" 1000 5000 > extracted-data ``` ``` -------------------------------- ### Create Basic Single-File Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Use this for small applications, internal tools, or quick prototypes. It creates a simple archive with minimal compression and temporary extraction. ```shell makeself.sh myapp myapp.run "MyApp v1.0" ./install.sh ``` -------------------------------- ### Initialize project submodules Source: https://github.com/megastep/makeself/blob/master/README.md Required command to initialize and update git submodules after cloning the repository. ```bash git submodule update --init --recursive ``` -------------------------------- ### Copy Archive to Temporary Directory Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Use the --copy option to copy the archive to a temporary directory before extraction. This is useful for installers on media like CDs. ```sh makeself.sh --copy mydir archive.run "My App" ./install.sh ``` -------------------------------- ### Create a Simple Self-Extracting Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Organize your application files and then use makeself.sh to create a self-extracting archive that automatically runs a specified script upon extraction. ```sh # Organize files to archive mkdir myapp cp program.sh myapp/ cp README.md myapp/ # Create self-extracting archive ./makeself.sh myapp myapp.run "MyApp v1.0" ./program.sh # Result: myapp.run is now a standalone executable ``` -------------------------------- ### Distributed Verification Workflow Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Verifies the archive's signature using GPG before proceeding with installation. Essential for supply chain security and public software distribution. ```sh # User receives archive + signer's GPG public key wget myapp-1.0.run wget myapp-1.0.gpg.pub # Import signer's public key gpg --import myapp-1.0.gpg.pub # Verify archive signature ./myapp-1.0.run --verify-sig "0xABCD1234" # Key fingerprint # Proceed with installation only if verified if [ $? -eq 0 ]; then ./myapp-1.0.run else echo "Signature verification failed!" exit 1 fi ``` -------------------------------- ### Display Help Message Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Shows the help message detailing all available command-line options for executing the archive. ```shell ./myapp.run --help ``` -------------------------------- ### Make Archive Executable Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md If you receive a 'Permission denied' error when running an archive, ensure the file has execute permissions. Use chmod +x to grant execute permissions. ```sh chmod +x myapp.run ./myapp.run ``` -------------------------------- ### Argument Handling Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Special argument for separating Makeself options from arguments passed to the embedded startup script. ```APIDOC ## Argument Handling ### `--` Separator to prevent Makeself from interpreting subsequent arguments. Passes all following arguments to embedded startup script. ```sh ./myapp.run --keep -- --script-option1 --script-option2 ``` ``` -------------------------------- ### Basic Archive Execution Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Execute a self-extracting archive by making it executable and running it. The archive will extract its contents and run the default startup script. ```sh # Just run it ./myapp.run ``` -------------------------------- ### Recommended Compression for Most Uses Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md For most applications, bzip2 compression offers a good balance between compression ratio and performance. This command demonstrates creating an archive with bzip2. ```sh ./makeself.sh --bzip2 myapp myapp.bz2.run "Label" ./install.sh ``` -------------------------------- ### Extract Raw Bytes with MS_dd Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md Use `MS_dd` to extract a specified number of raw bytes from an archive file starting at a given offset. This function is compatible with both BSD and GNU `dd`. ```bash MS_dd "$archname" 1000 5000 > extracted-data ``` -------------------------------- ### Basic Archive Execution Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md The standard way to execute a makeself archive, allowing for options and additional script arguments. ```shell ./archive.run [options] [--] [additional_script_args] ``` -------------------------------- ### Automate Archive Creation in CI/CD Pipeline Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Integrate archive creation into CI/CD pipelines for automated builds and releases. This script demonstrates non-interactive creation with automated metadata and consistent compression. ```shell #!/bin/bash # In CI pipeline (e.g., GitHub Actions, GitLab CI) VERSION=$(cat VERSION) BUILD_DATE=$(date -u +%Y-%m-%d) BUILD_ID=${CI_BUILD_ID:-local} makeself.sh \ --quiet \ --gzip \ --complevel 6 \ --sha256 \ --tar-extra "--exclude=.git --exclude=tests" \ --packaging-date "$BUILD_DATE" \ ./build/output \ "myapp-${VERSION}-${BUILD_ID}.run" \ "MyApp $VERSION (Build $BUILD_ID)" \ ./install.sh ``` -------------------------------- ### Pre-Extraction Validation Script Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md An example bash script designed to be embedded within a makeself archive using the `--preextract` option. It checks for system requirements like OS and necessary commands. ```bash #!/bin/bash # pre-install.sh - Embedded via --preextract echo "Checking system requirements..." # Check OS if [ "$(uname)" != "Linux" ]; then echo "Error: Only Linux is supported" exit 1 fi # Check required commands for cmd in python3 curl openssl; do if ! command -v "$cmd" &> /dev/null; then echo "Error: $cmd is required but not installed" exit 1 fi done ``` -------------------------------- ### Follow Symbolic Links During Archiving Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md The --follow option instructs makeself to store the content of files pointed to by symbolic links, rather than the links themselves. ```sh makeself.sh --follow mydir archive.run "My App" ./install.sh ``` -------------------------------- ### Export Configuration to Startup Script Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md With `--export-conf`, configuration variables are made available to the startup script executed after extraction. This allows the script to access details like the archive label and arguments. ```sh makeself.sh --export-conf mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Prompt for Confirmation Before Execution Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md The `--confirm` flag requires the user to explicitly confirm before executing the archive's startup script. This adds an extra layer of safety for manual execution. ```sh makeself.sh --confirm archive.run ``` -------------------------------- ### Create Multi-Architecture Distribution Archives Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Generate separate, identically signed archives for different platforms, enabling universal distribution of cross-platform software. Users can verify all versions with the same key. ```shell # Linux x86_64 makeself.sh \ --sign "build-key-passphrase" \ --sha256 \ ./app-linux-x64 \ myapp-1.0-linux-x64.run \ "MyApp v1.0 for Linux x86_64" \ ./install.sh # Linux ARM64 makeself.sh \ --sign "build-key-passphrase" \ --sha256 \ ./app-linux-arm64 \ myapp-1.0-linux-arm64.run \ "MyApp v1.0 for Linux ARM64" \ ./install.sh # macOS makeself.sh \ --sign "build-key-passphrase" \ --sha256 \ ./app-macos \ myapp-1.0-macos.run \ "MyApp v1.0 for macOS" \ ./install.sh ``` -------------------------------- ### Common Makeself Archive Creation Options Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Reference for common makeself options related to compression, checksums, signing, encryption, and metadata. ```sh # Common options --gzip, --bzip2, --xz, --zstd # Compression --sha256, --nomd5, --nocrc # Checksums --sign PASS # GPG signature --gpg-encrypt # Encryption --license FILE # License file --target DIR # Installation directory --preextract FILE # Pre-extract script --cleanup FILE # Cleanup script ``` -------------------------------- ### Full X11 Terminal Execution with Confirmation Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Executes the archive in a full X11 terminal and prompts the user for confirmation before running the embedded startup script. This ensures user approval before proceeding. ```sh ./installer.run --confirm # Opens X11 terminal, prompts for confirmation before running script ``` -------------------------------- ### Accept License Without Prompting Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Use the `--accept` flag during archive execution to automatically agree to the embedded license without user interaction. This is useful for automated deployments. ```sh makeself.sh --accept archive.run ``` -------------------------------- ### Use Custom Help Header Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Replace the default help message with a custom one by providing a file path to the `--help-header` option. This allows for tailored user guidance during archive execution. ```sh makeself.sh --help-header ./custom-help.txt mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Extract and Skip Cleanup Script Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Extracts files and runs the startup script, but skips the execution of the cleanup script. ```shell ./myapp.run --noexec-cleanup ``` -------------------------------- ### Accept License Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Use this option to automatically accept any embedded license without interactive prompting. ```shell ./myapp.run --accept ``` -------------------------------- ### Confirm Execution Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md This option prompts the user for confirmation before running the embedded startup script. ```shell ./myapp.run --confirm ``` -------------------------------- ### Enable Verbose Output for Archive Creation Source: https://github.com/megastep/makeself/blob/master/_autodocs/errors.md Use the --verbose flag during archive creation to log detailed build information. Redirect output to a file for later analysis. ```sh # Archive creation makeself.sh --verbose mydir archive.run "Label" ./install.sh 2>&1 | tee build.log ``` -------------------------------- ### Pass Arguments to Cleanup Script Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Allows passing custom arguments to the cleanup script executed after the main startup script. Multiple arguments should be quoted. ```shell ./myapp.run --cleanup-args "arg1 arg2 arg3" ``` -------------------------------- ### Create Encrypted Proprietary Software Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Build a password-protected archive for restricted distribution of commercial or confidential software. It uses GPG symmetric encryption and requires user interaction for password entry. ```shell makeself.sh \ --gzip \ --gpg-encrypt \ --sha256 \ --license PROPRIETARY_LICENSE.txt \ ./proprietary-app \ proprietary.run \ "Proprietary Software (Encrypted)" \ ./install.sh # User will be prompted for password during creation and extraction ``` -------------------------------- ### Export Configuration Variables Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Use --export-conf to export configuration variables to the startup script's environment during archive creation. ```sh makeself.sh --export-conf mydir archive.run "My App" ./install.sh ``` -------------------------------- ### Makeself Archive Execution Commands Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Commands for running and interacting with a makeself archive. Includes options for checking integrity, listing contents, showing metadata, and controlling execution. ```sh # Run archive ./archive.run # Default: extract and run ./archive.run --check # Verify integrity ./archive.run --list # List contents ./archive.run --info # Show metadata ./archive.run --noexec # Extract only ./archive.run --confirm # Confirm before running ``` -------------------------------- ### Create Archive with Gzip Compression Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Use this command to create a self-extracting archive using default gzip compression. Specify the directory to archive, the output filename, a descriptive label, and the startup script. ```sh makeself.sh --gzip mydir archive.run "My App" ./install.sh ``` -------------------------------- ### Select TAR Format for Makeself Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/compatibility.md Choose the TAR format for your makeself archive based on compatibility needs. 'posix' is recommended for modern systems, while 'ustar' offers maximum compatibility. 'gnu' is used for features like long filenames. ```sh makeself.sh --tar-format posix mydir archive.run "Label" ./install.sh ``` ```sh makeself.sh --tar-format ustar mydir archive.run "Label" ./install.sh ``` ```sh makeself.sh --tar-format gnu mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Create Archive with Pre-Extract and Cleanup Scripts Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Builds a self-extracting archive that executes custom scripts before extraction and after cleanup. This allows for pre-installation checks or post-installation tasks. ```shell makeself.sh \ --preextract checks.sh \ --cleanup cleanup.sh \ ./myapp \ myapp.run \ "MyApp v1.0" \ ./install.sh ``` -------------------------------- ### Create a basic self-extracting archive Source: https://github.com/megastep/makeself/blob/master/README.md Generate a self-extracting package by specifying the source directory, output filename, label, and startup script. ```sh makeself.sh /home/joe/mysoft mysoft.sh "Joe's Nice Software Package" ./setup ``` -------------------------------- ### Print Help Message Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md The --help or -h option displays the help message and exits the program. ```sh makeself.sh --help ``` -------------------------------- ### Create Archive with Legacy Unix Compress Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Use the legacy Unix `compress` command for creating the archive. This option is available for compatibility with older systems. ```sh makeself.sh --compress mydir archive.run "My App" ./install.sh ``` -------------------------------- ### Create Archive with Zstandard (Zstd) Compression Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Employ zstandard (Zstd) compression for a good balance between compression ratio and speed. The output filename should reflect the Zstd compression. ```sh makeself.sh --zstd mydir archive.zstd.run "My App" ./install.sh ``` -------------------------------- ### Encrypted Archive Password Sources Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md Demonstrates how to provide passwords for encrypted archives from environment variables, files, or standard input. ```sh # Password from environment variable export INSTALL_PASS="secure-password" ./encrypted.run --ssl-pass-src "env:INSTALL_PASS" ``` ```sh # Password from file chmod 600 /tmp/pwd.txt ./encrypted.run --ssl-pass-src "file:/tmp/pwd.txt" shred /tmp/pwd.txt # Securely delete ``` ```sh # Password from stdin echo "my-password" | ./encrypted.run --ssl-pass-src "fd:0" ``` -------------------------------- ### Create Archive with No Compression (TAR Only) Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Create an archive without any compression, essentially producing a TAR file. This is useful when compression is not desired or necessary. ```sh makeself.sh --nocomp mydir archive.tar "My App" ./install.sh ``` -------------------------------- ### Create Archive with Bzip2 Compression Source: https://github.com/megastep/makeself/blob/master/_autodocs/QUICKSTART.md Use the --bzip2 option to create an archive with bzip2 compression, which offers better compression ratios than gzip at the cost of slower compression/decompression. ```sh # Use bzip2 instead of gzip for better compression ./makeself.sh \ --bzip2 \ myapp \ myapp.bz2.run \ "MyApp v1.0" \ ./install.sh ``` -------------------------------- ### Set Environment Variables for Archive Execution Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Demonstrates how to set environment variables to control archive execution behavior, such as skipping checksum validation, specifying a custom temporary directory, or providing a password for encrypted archives. ```shell # Skip checksum validation export SETUP_NOCHECK=1 ./myapp.run # Custom temporary directory export TMPDIR=/var/tmp ./myapp.run # Custom password for OpenSSL-encrypted archive export MY_PASSWORD="secret" ./myapp.run --ssl-pass-src "env:MY_PASSWORD" ``` -------------------------------- ### Embed License File Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Use the `--license` option to include a license file within the archive. The user will be prompted to accept the license before extraction can proceed. ```sh makeself.sh --license LICENSE.txt mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Configure Verbose Development Build Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Sets variables for a verbose development build, enabling prompts and progress indicators. Use this during development to see all output and prompts. ```sh verbose=y quiet=n keep=y noprogress=n ``` -------------------------------- ### Display Archive Help Message with MS_Help Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md Use `MS_Help` to display the help message for archive usage, listing all supported options and environment variables. This is typically invoked via the `--help` flag. ```bash ./archive.run --help ``` -------------------------------- ### Automated Testing in CI for Makeself Archives Source: https://github.com/megastep/makeself/blob/master/_autodocs/usage-patterns.md A bash script designed for CI pipelines to automate testing of makeself archives. It covers integrity, listing, and execution tests. ```shell #!/bin/bash # test-makeself.sh - Run in CI pipeline set -e # Create test archive ./makeself.sh --gzip ./test-data test-archive.run "Test" ./test-data/run.sh # Run tests test_integrity() { ./test-archive.run --check || return 1 } test_list() { ./test-archive.run --list | grep -q "test-data" || return 1 } test_execution() { ./test-archive.run --quiet || return 1 } # Execute tests test_integrity && echo "✓ Integrity test passed" test_list && echo "✓ List test passed" test_execution && echo "✓ Execution test passed" rm -f test-archive.run echo "All tests passed!" ``` -------------------------------- ### Extract Only (No Execution) Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Extracts archive contents but does not run the embedded startup script. Implies `--noexec-cleanup`. ```shell ./myapp.run --noexec ``` -------------------------------- ### Umask Handling in Makeself Archives Source: https://github.com/megastep/makeself/blob/master/_autodocs/compatibility.md Demonstrates the default restrictive umask behavior and how to disable it using the --keep-umask flag. ```sh # Default behavior umask 077 # Restrictive: files world-unreadable # Can be disabled with makeself.sh --keep-umask mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Configure GPG Signing Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Set SIGN to 'y' to enable GPG signing. Provide the GPG_PASSPHRASE for authentication and the SIGNATURE if pre-computed. ```sh SIGN=y GPG_PASSPHRASE="secret-key" SIGNATURE="iD8DBQEy/mB...RvQ==" # Computed from GPG signature ``` -------------------------------- ### Environment Variables Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/archive-execution.md Environment variables that can be used by startup scripts to access information about the archive execution context. ```APIDOC ## Environment Variables ### `USER_PWD` Set to the directory from which the archive was executed. Accessible from startup scripts. ```sh # In startup script: echo "Archive launched from: $USER_PWD" cd "$USER_PWD" && cp required-file . ``` ### `ARCHIVE_DIR` Set to the directory containing the archive. Accessible from startup scripts. ```sh # In startup script: echo "Archive location: $ARCHIVE_DIR" ``` ### `ARCHIVE_NAME` Set to the filename of the archive. Accessible from startup scripts. ```sh # In startup script: echo "Archive name: $ARCHIVE_NAME" ``` ### `SETUP_NOCHECK` If set to `1`, skip checksum validation during extraction. ```sh export SETUP_NOCHECK=1 ./myapp.run ``` ### `TMPDIR` Temporary directory base (default: `/tmp`). Used for extraction if `--keep` not specified. ```sh export TMPDIR=/var/tmp ./myapp.run ``` ``` -------------------------------- ### Set Archive Metadata Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Define metadata for the archive, including a label, the startup script, its arguments, and a custom date. ```sh LABEL="MyApp v1.0" SCRIPT="./install.sh" SCRIPTARGS="--target /opt --verbose" DATE="Sun Jun 15 14:30:45 UTC 2025" ``` -------------------------------- ### Create Signed and Encrypted Archive Source: https://github.com/megastep/makeself/blob/master/_autodocs/MANIFEST.txt This snippet shows how to create an archive that is both signed and encrypted using GPG asymmetric encryption. A passphrase is required for signing. ```bash makeself.sh --gpg-asymmetric-encrypt-sign --sign PASS --sha256 mydir archive.run "Label" ./install.sh ``` -------------------------------- ### Display and Accept License with MS_PrintLicense Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/header-functions.md Use `MS_PrintLicense` to display the embedded license file and prompt the user for acceptance. The function exits with code 1 if the license is rejected, unless the `--accept` flag is used. ```bash if [ "$licensetxt" != "" ]; then MS_PrintLicense fi ``` -------------------------------- ### Display Archive Metadata Source: https://github.com/megastep/makeself/blob/master/_autodocs/configuration.md Use the `--info` flag to display detailed metadata about the archive, including its label, packaging date, and any embedded license or LSM information. ```sh makeself.sh --info archive.run ``` -------------------------------- ### Execute Pre-Extraction Script Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/makeself-sh.md Use --preextract to specify a script that will be executed before the archive contents are extracted. This script receives the same arguments as the main startup script. ```sh makeself.sh --preextract pre-install.sh mydir archive.run "My App" ./install.sh ``` -------------------------------- ### GPG, OpenSSL, and Base64 Encryption Settings Source: https://github.com/megastep/makeself/blob/master/_autodocs/api-reference/shell-variables.md Set up encryption modes and commands for securing archives. Supports GPG symmetric encryption, OpenSSL with password protection, and Base64 encoding. ```sh # GPG symmetric ENCRYPT_MODE=gpg ENCRYPT_CMD="gpg -ac -z9 -o -" DECRYPT_CMD="gpg -d" # OpenSSL with password ENCRYPT_MODE=openssl ENCRYPT_CMD="openssl enc -aes-256-cbc -salt -pbkdf2 -md sha256 -pass pass:secret" DECRYPT_CMD="openssl enc -aes-256-cbc -d -salt -pbkdf2 -md sha256" # Base64 ENCRYPT_MODE=base64 ENCRYPT_CMD="base64" DECRYPT_CMD="base64 --decode" ```