FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Development

 
 
LinkBack Thread Tools
 
Old 03-11-2010, 09:07 PM
Ghost1227
 
Default Remove FTP_OS_SUFFIX variable

---
config | 1 -
misc-scripts/ftpdir-cleanup | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/config b/config
index a563f35..57ae64b 100644
--- a/config
+++ b/config
@@ -1,6 +1,5 @@

FTP_BASE="/srv/ftp"
-FTP_OS_SUFFIX="os"

SVNREPO="file:///srv/svn-packages"

diff --git a/misc-scripts/ftpdir-cleanup b/misc-scripts/ftpdir-cleanup
index da2f95b..d35b511 100755
--- a/misc-scripts/ftpdir-cleanup
+++ b/misc-scripts/ftpdir-cleanup
@@ -15,7 +15,7 @@ dest=$2

${CLEANUP_DRYRUN} && echo 'dry run mode is active'

-ftppath_base="$FTP_BASE/$reponame/$FTP_OS_SUFFIX"
+ftppath_base="$FTP_BASE/$reponame/os"

for arch in ${ARCHES[@]}; do

--
1.7.0.2




--
 
Old 03-11-2010, 09:18 PM
Daenyth Blank
 
Default Remove FTP_OS_SUFFIX variable

On Thu, Mar 11, 2010 at 17:07, Ghost1227 <ghost1227@archlinux.us> wrote:
> ---
> *config * * * * * * * * * * *| * *1 -
> *misc-scripts/ftpdir-cleanup | * *2 +-
> *2 files changed, 1 insertions(+), 2 deletions(-)
While it does make the code a little more readable, I have to suggest
against this. It makes it a little harder to use this on non-official
repos because they won't always have the same directory structure.
Ideally I'd like to see the paths and such defined outside of the
script in a config file, but for now it would be a ton easier to at
least keep the variable.
 
Old 03-11-2010, 09:29 PM
Aaron Griffin
 
Default Remove FTP_OS_SUFFIX variable

On Thu, Mar 11, 2010 at 4:18 PM, Daenyth Blank <daenyth+arch@gmail.com> wrote:
> On Thu, Mar 11, 2010 at 17:07, Ghost1227 <ghost1227@archlinux.us> wrote:
>> ---
>> *config * * * * * * * * * * *| * *1 -
>> *misc-scripts/ftpdir-cleanup | * *2 +-
>> *2 files changed, 1 insertions(+), 2 deletions(-)
> While it does make the code a little more readable, I have to suggest
> against this. It makes it a little harder to use this on non-official
> repos because they won't always have the same directory structure.
> Ideally I'd like to see the paths and such defined outside of the
> script in a config file, but for now it would be a ton easier to at
> least keep the variable.

That's another ball game. This variable was used in *one* place, and
in about 30 other places "os" was hardcoded. Additionally, it had one
of those silly variable names that just told you what the VALUE was,
not the purpose. Like:

#define HELLO_WORLD_STRING "Hello World"
vs
#define OUTPUT_STRING "Hello World"

Instead of "FTP_OS_SUFFIX" something like "FTP_EXTRA_PATH" would be
more ideal. If you want to add that, it'd be best to patch that in to
ALL the places that use "os"

As it stands, the variable and the single use are it is useless.
 
Old 03-11-2010, 09:31 PM
Daenyth Blank
 
Default Remove FTP_OS_SUFFIX variable

On Thu, Mar 11, 2010 at 17:29, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
> That's another ball game. This variable was used in *one* place, and
> in about 30 other places "os" was hardcoded.

Ah, I see what you mean. I didn't realize that was part of the reason
for removal. Makes more sense now, though I'd still like to see other
revisions... oh well, time to get hacking.
 

Thread Tools




All times are GMT. The time now is 09:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org