17 lines
554 B
Bash
17 lines
554 B
Bash
|
#!/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;
|