#!/bin/sh

printed="no"

print_head() {
    if [ "$printed" = "yes" ]; then
    return
    fi
    printf '┏━(\033[1;31mParrot Security\033[00m)\n'
    printf '┃\n'
    printed="yes"
}

print_tail() {
    if [ "$printed" = "no" ]; then
    return
    fi
    printf '┗━\n'
}


if command -v pwsh > /dev/null; then
  pwsh -c ". /usr/share/windows-resources/powercat/powercat.ps1; powercat $@"
else
  print_head
    cat <<END
┃ If you want to execute powercat script you need to install powershell:
┃ $ sudo apt install powershell
┃
END
  print_tail
  parrot-ls /usr/share/windows-resources/powercat
fi
