diff options
| author | Brijesh Singh <brijesh.singh@amd.com> | 2020-04-23 11:04:02 -0500 |
|---|---|---|
| committer | Brijesh Singh <brijesh.singh@amd.com> | 2020-04-23 11:09:53 -0500 |
| commit | 654f67300bdf847d5b16f3a75e4b1714c36e1e35 (patch) | |
| tree | 5e78459d60c88ac12417c80e85a187417acdd121 /build.sh | |
| parent | f1bdac7e7dc1f569c6624da7901aa2607461e8d6 (diff) | |
| download | cachepc-amdsev-654f67300bdf847d5b16f3a75e4b1714c36e1e35.tar.gz cachepc-amdsev-654f67300bdf847d5b16f3a75e4b1714c36e1e35.zip | |
add option to create install package
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -29,6 +29,10 @@ while [ -n "$1" ]; do -h|--help) usage ;; + --package) + BUILD_PACKAGE="1" + shift + ;; -*|--*) echo "Unsupported option: [$1]" usage @@ -64,3 +68,22 @@ else ;; esac fi + +if [[ "$BUILD_PACKAGE" = "1" ]]; then + OUTPUT_DIR="snp-release-`date "+%F"`" + rm -rf $OUTPUT_DIR + mkdir -p $OUTPUT_DIR/linux + mkdir -p $OUTPUT_DIR/usr + cp -dpR $INSTALL_DIR $OUTPUT_DIR/usr/ + + if [ "$ID_LIKE" = "debian" ]; then + cp linux-image-*.deb $OUTPUT_DIR/linux -v + else + cp kernel-*.rpm $OUTPUT_DIR/linux -v + fi + + cp launch-qemu.sh ${OUTPUT_DIR} -v + cp install.sh ${OUTPUT_DIR} -v + cp kvm.conf ${OUTPUT_DIR} -v + tar zcvf ${OUTPUT_DIR}.tar.gz ${OUTPUT_DIR} +fi |
