Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
a7cbe7c9
Commit
a7cbe7c9
authored
13 years ago
by
Timothy Lebo
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up linker
parent
4c82d507
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/link-components.sh
+29
-29
29 additions, 29 deletions
utils/link-components.sh
with
29 additions
and
29 deletions
utils/link-components.sh
+
29
−
29
View file @
a7cbe7c9
#!/bin/bash
#
# Script to borrow essential bits
f
rom another lodspeakr.
# Script to borrow essential bits
;
rom another lodspeakr
instance on local machine
.
# Desired when lodspeakr essentials are maintained in a project-specfic repository.
# Contributed by Tim Lebo when trying to apply lodspeakr for DataFAQs.
#
# Usage:
# bash-3.2$ pwd
# /Applications/XAMPP/htdocs/hello/lodspeakr
#
# bash-3.2$ sudo rm -rf .htaccess settings.inc.php models views
#
# bash-3.2$ sudo /Users/lebo/projects/lodspeakr/github/lodspeakr/utils/link-components.sh /Users/lebo/projects/DataFAQs/github/DataFAQs/ui/configure-epoch/lodspeakr
# ln -s /Users/lebo/projects/DataFAQs/github/DataFAQs/ui/configure-epoch/lodspeakr/settings.inc.php settings.inc.php
# ln -s /Users/lebo/projects/DataFAQs/github/DataFAQs/ui/configure-epoch/lodspeakr/.htaccess .htaccess
# ln -s /Users/lebo/projects/DataFAQs/github/DataFAQs/ui/configure-epoch/lodspeakr/models models
# ln -s /Users/lebo/projects/DataFAQs/github/DataFAQs/ui/configure-epoch/lodspeakr/views views
#
# bash-3.2$ sudo /Users/lebo/projects/lodspeakr/github/lodspeakr/utils/link-components.sh /Users/lebo/projects/DataFAQs/github/DataFAQs/ui/configure-epoch/lodspeakr
# WARNING: not linking settings.inc.php because it exists.
# WARNING: not linking .htaccess because it exists.
# WARNING: not linking models because it exists.
# WARNING: not linking views because it exists.
if
[
$#
-lt
1
]
;
then
echo
"usage:
`
basename
$0
`
other-lodspeakr-directory"
exit
1
fi
if
[
!
-d
$otherDir
]
;
then
otherDir
=
"
$1
"
if
[[
!
-d
$otherDir
&&
"
$otherDir
"
!=
"/"
]]
;
then
echo
"
$otherDir
does not exist."
exit
1
fi
if
[[
!
-e
settings.inc.php
&&
-e
$otherDir
/settings.inc.php
]]
;
then
echo ln
-s
$otherDir
/settings.inc.phpl settings.inc.php
ln
-s
$otherDir
/settings.inc.phpl settings.inc.php
else
echo
"WARNING: not linking settings.inc.phpl because it exists."
fi
if
[[
!
-e
.htaccess
&&
-e
$otherDir
/.htaccess
]]
;
then
echo ln
-s
$otherDir
/models models
ln
-s
$otherDir
/models models
else
echo
"WARNING: not linking models/ because it exists."
fi
if
[[
!
-e
models
&&
-e
$otherDir
/models
]]
;
then
echo ln
-s
$otherDir
/models models
ln
-s
$otherDir
/models models
else
echo
"WARNING: not linking models/ because it exists."
fi
if
[[
!
-e
views
&&
-e
$otherDir
/views
]]
;
then
echo ln
-s
$otherDir
/views views
ln
-s
$otherDir
/views views
else
echo
"WARNING: not linking views/ because it exists."
fi
for
essential
in
settings.inc.php .htaccess models views
;
do
if
[[
!
-e
$essential
&&
-e
$otherDir
/
$essential
]]
;
then
echo ln
-s
$otherDir
/
$essential
$essential
ln
-s
$otherDir
/
$essential
else
echo
"WARNING: not linking
$essential
because it exists."
fi
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment