xdrm-framework/install.sh

17 lines
554 B
Bash
Raw Permalink Normal View History

2016-12-07 11:22:49 +00:00
#!/bin/sh
chmod -R +x `pwd`/exporter || ( echo "permission error" && exit );
dst="/usr/local/bin/xfw";
echo "Making the command \`xfw\` globally accessible";
echo "Create a symlink to $dst ? (y,n)";
read createlink;
echo "\n";
if [ "$createlink" = "y" ]; then
echo "(1) creating symlink";
echo "#!/bin/sh\n\nphp `pwd`/exporter/main.php \$*;" > $dst && echo "(2) changing permissions" && chmod +x $dst && echo "\n* The command \`xfw\` can now be used from everywhere" || ( echo "* aborting - removing file" && rm $dst );
else
echo "* aborting";
fi;