English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 10 September 2023, 13:58   #1
thyslo
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
However, the problem is when the project directory contains a .git subdirectory. Because the .git subdirectory is large, the LHA takes a long time.

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?
thyslo is offline  
Old 10 September 2023, 17:38   #2
daxb
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).
daxb is offline  
Old 11 September 2023, 13:22   #3
thyslo
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.
thyslo is offline  
Old 11 September 2023, 14:23   #4
daxb
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.
daxb is offline  
Old 11 September 2023, 15:24   #5
orphan264
Registered User
 
Join Date: Apr 2018
Location: Maine, USA
Posts: 51
Quote:
Originally Posted by thyslo View Post
So, is there any command line option for lha to omit the .git subdirectory?
Perhaps the messages in this thread will help!

https://eab.abime.net/showthread.php?p=1534245
orphan264 is offline  
Old 11 September 2023, 21:26   #6
thyslo
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
from the other thread help me to achieve what I was looking for:-)

Thank you
thyslo is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07201 seconds with 13 queries