public function writeLink($target)
    {
        $fileName = basename($target);
        $realTarget = realpath($target);
        $relativePathToTarget = $this->makePathRelative(dirname($realTarget), $this->binaryDir).basename($realTarget);

        // If Windows cmd link
        if (pathinfo($target, PATHINFO_EXTENSION) == "cmd") {
            $this->writeWindows($fileName, $relativePathToTarget);
        } else {
            $this->writeBash($fileName, $relativePathToTarget);
        }
    }