diff --git a/install_mvt.sh b/install_mvt.sh index 452afd0..f8ffbd5 100755 --- a/install_mvt.sh +++ b/install_mvt.sh @@ -23,4 +23,20 @@ then fi echo "'mvt' installed in /usr/local/bin" + +swift package --quiet plugin generate-manual 2>&1 >/dev/null +if [[ $? -ne 0 ]] +then + echo "Failed to build the 'mvt' man-page" + exit 1 +fi + +cp .build/plugins/GenerateManual/outputs/mvt/mvt.1 /usr/local/share/man/man1/ +if [[ $? -ne 0 ]] +then + echo "Failed to copy the 'mvt.1' man-page to /usr/local/share/man/man1/" + exit 1 +fi + +echo "'mvt' man-page installed in /usr/local/share/man/man1" exit 0