Artifact db5ffe0a2b9d4bff75a5919e943713f2e7fa7225:
- Executable file scripts/addpayload.sh — part of check-in [70e4b5df8a] at 2013-05-21 20:05:01 on branch util_git — Update bootstrapping script to use paklib/main.lua with targets 'clone' and 'configure'. Update paklib/main.lua to use PAKLIB_ROOT as the root for the paklib, or .spm/paklib if variable is not present. Update target 'build' to call 'tup' instead of '.spm/bin/tup'. This also allows for tup-less lightweight scripts, where tup is already present on the system. Update target 'clone' to make use of PAKLIB_ROOT environment variable, if present. Additionally target 'clone' uses the repo/$REMOTE.lua system now, to allow for future custom remotes. Update target 'configure' to make use of utils/conf.lua for handling updating/setting/creating build variables for tup/kconfig. Update target 'pull' to make use of PAKLIB_ROOT environment variable. Add new utility 'conf' for handling build configurations. Fixed utility 'git' not handling return values properly. Fix scripts/Tupfile depending on non-existant file. Now properly uses build configuration variables. Update addpayload script to make use of utility script 'conf' for retrieving build variables. (user: tcg.thegamer@gmail.com size: 875)
#!/bin/bash # Ensure that .spm/ exists before trying to write to it mkdir -p .spm/paklib/include/spm mkdir -p .spm/bin mkdir -p .spm/paklib/lib tup_root=$( echo "conf = dofile '../paklib/utils/conf.lua' print( conf.get( 'DIR_TUP_ROOT' ) ) " | lua -) [[ ! -e "../${tup_root}" ]] && exit 1 # Copy the required files into .spm printf " * Creating .spm archive ..."; cp -vf ../src/spm .spm/bin/spm cp -vf ../${tup_root}/tup .spm/bin/tup cp -rf ../paklib/ .spm/ find .spm/paklib/ -iname '*.swp' -delete printf "[DONE]\n"; # Archive .spm into spm.tgz and add the payload to the shell script printf " * Creating spm.tar.bz2..."; tar -cf spm.tar .spm/ bzip2 -9 spm.tar cp -f spm.sh.in spm.sh echo "PAYLOAD:" >> spm.sh base64 spm.tar.bz2 >> spm.sh printf "[DONE]\n"; # Remember to clean up after ourselves printf " * Cleaning up...."; rm -Rf spm.tar.bz2 .spm/ printf "[DONE]\n";