WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Backup $PATH or exectuables?  (Read 2768 times)

Offline RedPenguin

  • Newbie
  • *
  • Posts: 3
Backup $PATH or exectuables?
« on: January 18, 2011, 06:32:38 PM »
I have installed SABnzbd to TinyCore and all works well.

I have compiled par2cmdline for TinyCore and it also works perfectly.

Now the only problem I see is, how do I keep par2, par2create, par2verify, par2repair in a place such as /usr/bin or /usr/local/bin?

I read about /opt/.filetool.lst but I am not sure it's a good idea to put in /usr/bin or /usr/local/bin, as that could have weird side effects with extensions.

What would be the best way to keep par2 in PATH so it's always there for SAB?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Backup $PATH or exectuables?
« Reply #1 on: January 18, 2011, 06:38:30 PM »
You need to create extensions that can be loaded on boot.
http://wiki.tinycorelinux.com/Creating+Extensions

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Backup $PATH or exectuables?
« Reply #2 on: January 18, 2011, 07:03:16 PM »
Any executables in /home/tc/.local/bin are in path and will be backed up by default.

In order to have executables in other locations, symlinking them to /home/tc/.local/bin would be one approach, another one would be to have wrapper scripts in /home/tc/.local/bin which specify the path to executables.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline jerramy

  • Jr. Member
  • **
  • Posts: 76
Re: Backup $PATH or exectuables?
« Reply #3 on: January 18, 2011, 07:13:13 PM »
This is probably a cheesy way to do it, but you could have your bootlocal.sh script copy them to bin on bootup from somewhere in your home directory, or perhaps just have bootlocal.sh create symlinks there.

Offline RedPenguin

  • Newbie
  • *
  • Posts: 3
Re: Backup $PATH or exectuables?
« Reply #4 on: January 18, 2011, 07:26:08 PM »
You need to create extensions that can be loaded on boot.
http://wiki.tinycorelinux.com/Creating+Extensions

Thank you so much, that worked like a charm.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Backup $PATH or exectuables?
« Reply #5 on: January 18, 2011, 07:30:14 PM »
Happy to be of assistance.

Offline RedPenguin

  • Newbie
  • *
  • Posts: 3
Re: Backup $PATH or exectuables?
« Reply #6 on: January 18, 2011, 10:35:22 PM »
Any executables in /home/tc/.local/bin are in path and will be backed up by default.

In order to have executables in other locations, symlinking them to /home/tc/.local/bin would be one approach, another one would be to have wrapper scripts in /home/tc/.local/bin which specify the path to executables.

I don't seem to have this .local directory, or do you just create it?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Backup $PATH or exectuables?
« Reply #7 on: January 18, 2011, 11:33:54 PM »
Any executables in /home/tc/.local/bin are in path and will be backed up by default.

In order to have executables in other locations, symlinking them to /home/tc/.local/bin would be one approach, another one would be to have wrapper scripts in /home/tc/.local/bin which specify the path to executables.

I don't seem to have this .local directory, or do you just create it?

The latter   ;)

You may have to log out and in again for it to become in effect (I wouldn't know if there was a better way so profile would get re-read).
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Backup $PATH or exectuables?
« Reply #8 on: January 18, 2011, 11:48:12 PM »
Hi RedPenguin
.local if you have it is a hidden directory. Open a terminal and type "ls -a" without the
quotes. This will show all files and directories. Type "mkdir .local/bin". If it does not
exist it will be created, if it does system will tell you so. Copy your executables to
.local/bin. When you shutdown they will be backed up. When you restart the .profile
will add /home/tc/.local/bin to your path when you open a terminal.