TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Where you should keep your checked-out source code

2 pointsby rockhymasalmost 15 years ago

2 comments

byoung2almost 15 years ago
<i>because build scripts have hard-coded, absolute paths</i> We usually define these paths as constants in a config file (e.g. LIB_DIR, STATIC_DIR, etc.) and then use the constants in the rest of the code so that if you need to change it in your dev environment it's easy. It also makes it easy if we wanted to move those directories completely (e.g. to a different mount).
fragmedealmost 15 years ago
Define build script.<p>I definitely shouldn't have to check out my source to a specific path like /home/coworker/projA in order to compile it. That's just wrong. But the contained output, a .rpm or .deb puts libs in /usr/lib, binaries in /usr/bin; some path that's hard coded, and totally should be.
评论 #1602851 未加载