Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
cb3266d8
Unverified
Commit
cb3266d8
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Check that directory exists
parent
5ec40daa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-ipfs
+13
-11
13 additions, 11 deletions
src/freedombone-app-ipfs
with
13 additions
and
11 deletions
src/freedombone-app-ipfs
+
13
−
11
View file @
cb3266d8
...
...
@@ -408,18 +408,10 @@ fi
IPFS_PATH=
\$
GOPATH/bin
export PATH="
\$
GOPATH/bin:
\$
PATH:"
if ! grep -q 'GOPATH/bin' ~/.bashrc; then
echo 'export PATH="
\$
GOPATH/bin:
\$
PATH:";' >> ~/.bashrc
else
sed -i "s|systemctl set-environment GOPATH=.*|systemctl set-environment GOPATH=
\$
GOPATH|g" ~/.bashrc
fi
echo 'export PATH="
\$
GOPATH/bin:
\$
PATH:";' >> /home/
$MY_USERNAME
/.bashrc
# set gopath for the user
if ! grep -q "GOPATH=" /home/
$MY_USERNAME
/.bashrc; then
echo "export GOPATH=
$GOPATH
" >> /home/
$MY_USERNAME
/.bashrc
echo 'export PATH="
\$
GOPATH/bin:
\$
PATH:";' >> /home/
$MY_USERNAME
/.bashrc
else
sed -i "s|export GOPATH=.*|export GOPATH=
\$
GOPATH|g" /home/
$MY_USERNAME
/.bashrc
if grep -q 'GOPATH/bin' ~/.bashrc; then
sed -i "s|systemctl set-environment GOPATH=.*|systemctl set-environment GOPATH=
\$
GOPATH|g" ~/.bashrc
fi
chown
$MY_USERNAME
:
$MY_USERNAME
/home/
$MY_USERNAME
/.bashrc
...
...
@@ -429,6 +421,11 @@ if [ ! "$?" = "0" ]; then
exit 8242
fi
if [ ! -d
$GOPATH
/src/
$IPFS_GO_REPO2
]; then
echo
$'
go get failed to get ipfs'
exit 63923
fi
cd
\$
GOPATH/src/
$IPFS_GO_REPO2
git checkout
$IPFS_COMMIT
-b
$IPFS_COMMIT
exit 0
...
...
@@ -521,6 +518,11 @@ function install_ipfs_go {
exit
8242
fi
if
[
!
-d
$GOPATH
/src/
$IPFS_GO_REPO2
]
;
then
echo
$'go get failed to get ipfs'
exit
63923
fi
cd
$GOPATH
/src/
$IPFS_GO_REPO2
git checkout
$IPFS_COMMIT
-b
$IPFS_COMMIT
if
!
grep
-q
"ipfs commit"
$COMPLETION_FILE
;
then
...
...
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