embarrassing patch question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

Ok.  I've been using patch and I've asked some questions about it on IRC,
but I'm still not
sure about how to use it "CORRECTLY" or in the "PRESCRIBED-METHOD".  So,
please correct me.

I want to create a patch file to give to my co-workers and instructions on
how to use it.

With that said, here is the scenario:

I have a original directory called foo.orig and a "up-to-date" directory
called foo.latest.
So, I created a patch file using this syntax:
diff -Naur foo.orig foo.latest > foo.patch

Then to apply the patch, I did:
patch -p1 foo < foo.patch
or
patch -p1 foo.orig < foo.patch
I can't remember which one I did.

I think this is right.  However, it would be great if someone would clear
up the bit
about the target directory.  Does the target directory have to called the
same as the
"patched" or "orig" directory?  Is there a way to specify or edit the patch
file so
that the end user can have their own custom directory name.  For instance,
I used foo and foo.orig, but the end user might have directory names
like foo2 or foo.nfs, etc.

JD

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux