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
e88753d3
Commit
e88753d3
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Add some subdirectories to the mesh public desktop folder
parent
4f512f52
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-image-mesh
+3
-1
3 additions, 1 deletion
src/freedombone-image-mesh
src/meshavahi
+19
-0
19 additions, 0 deletions
src/meshavahi
with
22 additions
and
1 deletion
src/freedombone-image-mesh
+
3
−
1
View file @
e88753d3
...
...
@@ -680,7 +680,9 @@ function setup_ipfs {
TOX_ID
=
'none'
if
[
-d
/home/
$MY_USERNAME
/Desktop
]
;
then
if
[
!
-d
/home/
$MY_USERNAME
/Public
]
;
then
mkdir
/home/
$MY_USERNAME
/Public
mkdir
-p
/home/
$MY_USERNAME
/Public/Videos
mkdir
-p
/home/
$MY_USERNAME
/Public/Music
mkdir
-p
/home/
$MY_USERNAME
/Public/Documents
echo
$'Files within this directory will be publicly visible on the network'
>
/home/
$MY_USERNAME
/Public/README.txt
chown
-R
$MY_USERNAME
:
$MY_USERNAME
/home/
$MY_USERNAME
/Public
ln
-s
/home/
$MY_USERNAME
/Public /home/
$MY_USERNAME
/Desktop/Public
...
...
This diff is collapsed.
Click to expand it.
src/meshavahi
+
19
−
0
View file @
e88753d3
...
...
@@ -68,6 +68,25 @@ function ipfs_publish {
NEW_STAT
=
$(
stat
-t
$DIR_TO_CHECK
)
# include some subdirectories
for
dir
in
$DIR_TO_CHECK
/
*
/
do
REALLY_NEW_STAT
=
"
$NEW_STAT
$(
stat
-t
$dir
)
"
NEW_STAT
=
"
$REALLY_NEW_STAT
"
for
dir2
in
"
$dir
"
/
*
/
do
REALLY_NEW_STAT
=
"
$NEW_STAT
$(
stat
-t
$dir2
)
"
NEW_STAT
=
"
$REALLY_NEW_STAT
"
for
dir3
in
"
$dir2
"
/
*
/
do
REALLY_NEW_STAT
=
"
$NEW_STAT
$(
stat
-t
$dir3
)
"
NEW_STAT
=
"
$REALLY_NEW_STAT
"
done
done
done
if
[
"
$OLD_STAT
"
!=
"
$NEW_STAT
"
]
;
then
su
-c
"echo
\$
(
$IPFS_COMMAND
add -rq /home/
$MY_USERNAME
/Public | tail -n 1) >
$IPFS_PUBLIC
"
-
$MY_USERNAME
echo
"
$NEW_STAT
"
>
$OLD_STAT_FILE
...
...
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