- Create an installer script
- Append an archive file into an installer script
- Give an executable permission
- Execute the installer script
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/bash echo "Running self-extracting installer" ARCHIVE=` awk '/^__START_HERE__/ {print NR + 1; exit 0; }' $0` echo $ARCHIVE tail -n+$ARCHIVE $0 | tar xzv exit 0 __START_HERE__ |
cat myproject.tar.gz >> installer
chmod +x installer
./installer
No comments:
Post a Comment