10 September 2023, 13:58 | #1 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
Lha commandline to skip .git subdirectory
I often use lha to back up a directory like
Code:
Lha -zerax a DH2:Backup-projectdir-2023-09-10.lha DH1:projects/projectdir I don't need the .git directory in the backup file. So, is there any command line option for lha to omit the .git subdirectory? |
10 September 2023, 17:38 | #2 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,304
|
For quick adding files you can use the option -Qq.
For excluding file you can try "pattern matching" (see lha.guide) or maybe use a file list (-i) instead. I tried '~(.git)' but it works not as expected (no files added but directories will). |
11 September 2023, 13:22 | #3 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
Thank you!
Too bad, '~(.git)' isn't working as it would be the natural solution for the problem. So I maybe will choose a pragmatic solution: I do my lha backups anyway with a script 'dirupdate.rexx' that I wrote myself. I think I'll modify this script to temporarily move the .git directory to parent before lha runs, and then move it back afterwards (using the Rename command). I think, that'll do the trick. |
11 September 2023, 14:23 | #4 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,304
|
It was the first time I tried pattern matching with LHA. So there might be a way that it works. Maybe someone knows. As already mentioned you can also use a file list (-i) as a source for LHA as an alternative. AmigaOS should be able to create such a list with its LIST command but any other tool (or OS) can be used too. Or your ARexx script perhaps?
Usually, thomas knows such things or the LHA author if you want to ask. At least I would before going the workaround way. |
11 September 2023, 15:24 | #5 | |
Registered User
Join Date: Apr 2018
Location: Maine, USA
Posts: 51
|
Quote:
https://eab.abime.net/showthread.php?p=1534245 |
|
11 September 2023, 21:26 | #6 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
And indeed using a file list which also was shown in the two lines
Code:
list dh0:~(dirname2) lformat="*"%P%N*"" > T:backuplist.txt lha -r -a -e -iT:backuplist.txt a dh1:archive.lha Thank you |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FS-UAE git master F12 D for debugger doesn't seem to work | alkis | support.FS-UAE | 1 | 27 March 2022 19:23 |
GIT client for Amiga (sgit - simplegit) | KONEY | support.Other | 8 | 27 January 2018 13:21 |
Copper SKIP after SKIP | neoman | support.WinUAE | 3 | 29 June 2015 16:46 |
Commandline help | MrX_Cuci | support.WinUAE | 4 | 02 May 2010 05:25 |
Lucky git or what??!!! | Djay | Retrogaming General Discussion | 18 | 10 March 2004 22:16 |
|
|