Comments (9)
Thank you! I can confirm it's working now.
If possible the script could be further improved by showing some feedback that it's running. After making sure it worked I tested the scipt on the root folder.
The script took a few minutes to finish.
It would be nice to have an indicator it's still running and not frozen.
from dropboxignore.
Hello @AforDesign and happy new year.
Thank you for your kind words and for your feedback.
dropboxignore supports Mac OS but has been tested only on Linux :/, therefore, this is probably a bug. Can you provide some more details in order to reproduce the case?
- the content of generated
.dropboxignore
files. - the commands that you run and the standard output (use
-v 2
parameter in order to print debug messages) - the folder/file structure
from dropboxignore.
I ran into a few issues so it took me a bit longer to do some tests.
For the reproduction steps I installed a default laravel app in my websites folder.
Then I used he dropboxignore generate command to only target the main .gitignore file (btw works fine recursively).
Step 4 and 5 aren't really nescecary as the vendor folder, which is included in the .gitignore file has content by default
- create dir in websites folder: "local.dropboxignore.com"
- $ cd /myroot/websites/local.dropboxignore.com
- $ composer create-project laravel/laravel example-app
- (optional) $ cd example-app
- (optional) $ npm install
- $ dropboxignore generate dropboxignore generate /myroot/websites/local.dropboxignore.com/example-app/.gitignore -v 2
content .dropboxignore:
# ----
# Automatically Generated .dropboxignore file at do 7 jan 2021 15:54:26 CET
# ----
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
# ----
debug messages:
/usr/local/bin/dropboxignore: line 65: [: : integer expression expected
/usr/local/bin/dropboxignore: line 65: [: : integer expression expected
/usr/local/bin/dropboxignore: line 51: [: : integer expression expected
/usr/local/bin/dropboxignore: line 51: [: : integer expression expected
What I ultimately would like to achieve is 1 single .dropboxignore file in my 'websites' root dir, targetting at least all node_modules, vendor, cache and log folders in each underlying website folder.
from dropboxignore.
Well I'm pretty sure that the leading slash is causing the problem, try to manually update the .dropboxignore
file based on the following and run dropboxignore ignore
again
.dropboxignore:
# ----
# Automatically Generated .dropboxignore file at do 7 jan 2021 15:54:26 CET
# ----
node_modules
public/hot
public/storage
storage/*.key
vendor
.env
.env.backup
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
# ----
Reproducing your case:
$ mkdir -p /root/websites/local.dropboxignore.com/
$ cd /root/websites/local.dropboxignore.com
$ composer create-project laravel/laravel example-app
$ cd example-app/
$ dropboxignore generate .
Created file: bootstrap/cache/.dropboxignore
Created file: database/.dropboxignore
Created file: .dropboxignore
Created file: storage/app/.dropboxignore
Created file: storage/app/public/.dropboxignore
Created file: storage/framework/sessions/.dropboxignore
Created file: storage/framework/cache/data/.dropboxignore
Created file: storage/framework/cache/.dropboxignore
Created file: storage/framework/testing/.dropboxignore
Created file: storage/framework/.dropboxignore
Created file: storage/framework/views/.dropboxignore
Created file: storage/logs/.dropboxignore
Total number of generated files: 12
$ cat .dropboxignore
# ----
# Automatically Generated .dropboxignore file at Thu Jan 7 18:08:36 EET 2021
# ----
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
# ----
$ sed -i 's/^\///' .dropboxignore # or remove leading slashes manually
$ cat .dropboxignore
# ----
# Automatically Generated .dropboxignore file at Thu Jan 7 18:08:36 EET 2021
# ----
node_modules
public/hot
public/storage
storage/*.key
vendor
.env
.env.backup
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
# ----
$ dropboxignore ignore .
Total number of ignored files: 32
Note
Re-install dropboxignore in order to use the latest version.
from dropboxignore.
Ah, I see.
The ignore command actually activates the .dropboxignore file
I've used it the wrong way and remember having issues with it earlier.
The ignore command gives the following error:
/usr/local/bin/dropboxignore: line 301: getfattr: command not found
I've looked it up and found the following information:
source: https://www.lesbonscomptes.com/pages/extattrs.html
Specific command line utilities
Linux has the 'getfattr' and 'setfattr' utilities to retrieve and set xattrs. On Debian, you need to install the 'attr' package to get them.
FreeBSD has 'getextattr', 'lsextattr', 'rmextattr', 'setextattr'
Mac OS X has 'xattr'.
from dropboxignore.
Good catch! I will fix it asap and I will let you now
from dropboxignore.
@AforDesign I've made a fix, please install the latest version and test it again.
from dropboxignore.
@AforDesign happy to hear that!
Regarding the output, you definitely have a point. We should find the sweet-spot between printing every ignored file (ignored files could be hundreds) and printing only the number of ignored files.
regarding the progress, a simple spinner like this could be used.
Thank you for your valuable feedback and I will keep you up-to-date.
from dropboxignore.
A spinner like that would be great.
Even better though if a counter could be included that states the number of ignored files during the process.
This would be a great indicator the script is running succesfully.
Printing the ignored files isn't nescecary. You allready implemented list function for that.
from dropboxignore.
Related Issues (19)
- Doesn't work on MacMini HOT 5
- Command with relative path doesn't work on my Ubuntu 20.04 HOT 3
- `dropboxignore update` broken
- except pattern is ignored HOT 1
- is ** pattern supported ? HOT 10
- Support Windows HOT 8
- Can't ignore folders HOT 2
- Broken on later versions of OS X
- README: Please provide some details about the .dropboxignore file HOT 2
- Run tests using multiple github runners HOT 3
- Except pattern is not honored HOT 4
- Rather than deleting, use the attr functionality now available with dropbox HOT 1
- Installation script should not use wget as a default way to retrieve the dropboxingore HOT 1
- Junk characters in CLI output HOT 2
- realpath illegal option on macOS 13 HOT 3
- Upgrade codecov
- Skip Coverage Report pipeline step on macos-12
- Improve help message HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropboxignore.