added `install.sh` + `uninstall.sh`
This commit is contained in:
parent
3b55a56b24
commit
93653d8680
|
@ -1,6 +1,6 @@
|
|||
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
||||
|
||||
require_once 'Exporter.php';
|
||||
require_once __ROOT__.'/exporter/Exporter.php';
|
||||
|
||||
/* [1] Initialisation
|
||||
=========================================================*/
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/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;
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
dst="/usr/local/bin/xfw";
|
||||
|
||||
echo "Remove the symlink to $dst ? (y,n)";
|
||||
read removelink;
|
||||
echo "\n";
|
||||
|
||||
if [ "$removelink" = "y" ]; then
|
||||
rm $dst && echo "* The command \`xfw\` is no more accessible." || echo "* aborting";
|
||||
else
|
||||
echo "* aborting";
|
||||
fi;
|
Loading…
Reference in New Issue