LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   SlackBuild (https://www.linuxquestions.org/questions/slackware-14/slackbuild-426302/)

CrEsPo 03-19-2006 12:29 PM

SlackBuild
 
I followed a generic SlackBuild to create my own SlackBuild.

I modified a couple of lines, ran the script, and installed the package. The program works so I think I did everything right. There's one thing that I don't think I'm doing right when configuring the SlackBuild. There are still leftover files in the /tmp directory. Should I manually remove them, edit the SlackBuild to remove them or leave them there?

ie:
Code:

[~]$ cd /tmp/
[tmp]$ ls
. . .
package-vnstat
vnstat-1.4
[tmp]$


phil.d.g 03-19-2006 12:49 PM

It is usual to have something like:
Code:

# Clean up
if [ "$1" = "--cleanup" ]; then
  rm -rf ${TMP}/${NAME}-${VERSION}
  rm -rf $PKG
fi

at the end of your slackbuild script, and the script cleans up after you when you call it like:
Code:

# sh prog.SlackBuild --cleanup
And yes, it is safe to remove those directories

CrEsPo 03-19-2006 01:58 PM

Thanks for the reply, I realized the template I followed has the following:

Code:

# Clean up the extra stuff:

if [ "$1" = "--cleanup" ]; then
  rm -rf $PKG
fi

When I ran the script I ran it without the --cleanup option. I edited it to include the extra remove and ran it with the --cleanup option and it removes the directories. Thank-you, appreciate the help :).


All times are GMT -5. The time now is 06:58 PM.