I am creating a small extension to Nautilus using Python. I've seen some installation instructions around the web like:
curl 'https://example.com/some-program/install.sh' | bash
Since I am writing the extension on Python I made my "installer" run on the '__main__'
like:
curl 'https://example.org/my-extension/script.py' | python
The issue on hand is that I would like that the script copy itself to the appropriated location WITHOUT re-downloading the script. How could I write the Python script in a way to save itself without downloading itself again?
I am accepting any shell trickery or python wizardry that doesn't change the curl 'https://example.org/my-extension/script.py' | python
too much.