#!/bin/sh
# Original author: XGQT
# Licensed under the ISC License
# Copyright (c) 2020, src_prepare group
trap 'exit 128' INT
cd "${1:-$(pwd)}" || exit 1
path="$(git rev-parse --show-prefix)"
echo "${path%/}"