diff options
author | Cem Keylan <cem@ckyln.com> | 2020-07-24 20:37:56 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-07-24 20:37:56 +0300 |
commit | bb47652a438bc8bdded3d4c4e980543467bcf01c (patch) | |
tree | 4f372282e186cb5ae6c988aee240409fdc5d436e /core/kiss/post-install | |
parent | f1cf7fe05f1d58fa5b482272e70ab95948f0ae8f (diff) | |
download | repository-bb47652a438bc8bdded3d4c4e980543467bcf01c.tar.gz |
kiss: bootstrap to cpt
Diffstat (limited to 'core/kiss/post-install')
-rwxr-xr-x | core/kiss/post-install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/kiss/post-install b/core/kiss/post-install new file mode 100755 index 00000000..93a484a1 --- /dev/null +++ b/core/kiss/post-install @@ -0,0 +1,21 @@ +#!/bin/sh -e + +export CPT_ROOT=$KISS_ROOT +kiss b cpt && kiss i cpt || exit 1 + +# Make sure we don't have /var/db/cpt already +if [ -d "$KISS_ROOT/var/db/cpt" ]; then + out "It seems like you already have /var/db/cpt, it might be dangerous to continue." \ + "Proceed? [Ctrl+C to cancel]" + read -r _ + mv "$KISS_ROOT/var/db/kiss/"* "$KISS_ROOT/var/db/cpt" +else + mv "$KISS_ROOT/var/db/kiss" "$KISS_ROOT/var/db/cpt" +fi + +set +f +sed -i 's|^/var/db/kiss/|/var/db/cpt/|' /var/db/cpt/installed/*/manifest + +CPT_PATH=$(echo "$KISS_PATH" | sed 's|/var/db/kiss/|/var/db/cpt/|g') +export CPT_PATH +cpt-remove kiss |