markasoftware / anypaste

Upload and share any file with a single command.
https://anypaste.xyz
GNU General Public License v3.0
63 stars 4 forks source link

Add compatibility with Termux #17

Closed T3stX closed 5 years ago

T3stX commented 5 years ago

Please, add compatibility with Android app Termux.

I installed anypaste in the path /data/data/com.termux/files/usr/local/bin but when i try, for example, to list plugins i get an error about /tmp/ap_get_info: No such file or directory.

The problem concerns the path to /tmp which, in Termux, is specified in the variable TMPDIR and it is /data/.data/com.termux/files/usr/tmp.

markasoftware commented 5 years ago

I believe I've fixed all Termux-related problems on the develop branch (https://raw.githubusercontent.com/markasoftware/anypaste/develop/anypaste). I had /tmp hardcoded where mktemp calls should have been; I've corrected that.

It also seems like file isn't provided in the default Termux packages. Make sure to run pkg install file first!