mirror of
https://github.com/nettitude/PoshC2
synced 2026-06-08 16:22:47 +00:00
23 lines
346 B
Bash
Executable File
23 lines
346 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# trap ctrl-c and call ctrl_c()
|
|
trap ctrl_c INT
|
|
|
|
function ctrl_c() {
|
|
popd > /dev/null
|
|
exit
|
|
}
|
|
|
|
source /usr/local/bin/_posh-common
|
|
get_posh_dir
|
|
get_docker_image_name
|
|
|
|
pushd "$POSH_DIR" >/dev/null
|
|
|
|
if [ "$?" -eq "0" ]; then
|
|
posh-docker-clean
|
|
sudo -E docker build -t "$DOCKER_IMAGE_NAME" . "$@"
|
|
popd > /dev/null
|
|
fi
|
|
|