Giter VIP home page Giter VIP logo

Comments (10)

balupton avatar balupton commented on May 25, 2024 1

So here's what I'm thinking.

setup-dorothy will prompt if you want to use xdg if dorothy has not yet been cloned out.

if dorothy has been cloned out, then we check if dorothy is located in the xdg location, if we are then we set DOROTHY_XDG to yes

If dorothy has been cloned out, and we are in setup-dorothy install mode, then we ask if they want to use xdg or not.

In setup-environment-commands we do the same source location check to autoset DOROTHY_XDG to the correct value, and if we are in DOROTHY_XDG mode then that script actively moves everything to the xdg locations and exports the xdg locations.

if we are not in xdg locations, then we check if the xdg location exists, check if the non xdg location exists, and if both exist then we show a prompt to remove one of the offenders, or remove and symlink one of the offenders.

i will also be rewritting setup-dorothy, to just dorothy, of which dorothy setup is one of its commands, along with dorothy edit

from dorothy.

balupton avatar balupton commented on May 25, 2024

Need more context.

from dorothy.

molleweide avatar molleweide commented on May 25, 2024

basically how would one pass xdg to this:

bash -ilc "$(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/setup-dorothy)"

Edit:

some links:

https://stackoverflow.com/questions/42313918/how-to-pass-variables-in-curl
https://stackoverflow.com/questions/13341955/how-to-pass-a-variable-in-a-curl-command-in-shell-scripting
https://stackoverflow.com/questions/47196581/linux-bash-curl-how-to-pass-variables-to-the-url

I haven't read them but these where some of the results when searching for pass variables to curl

from dorothy.

molleweide avatar molleweide commented on May 25, 2024

some other issues have also occured whilst installing on my M1. I am going to document it and post in another issue later.

from dorothy.

balupton avatar balupton commented on May 25, 2024

In this case, we don't actually want to pass an argument, but pre-set an environment variable:

This may work:

env DOROTHY_XDG=yes bash -ilc "$(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/setup-dorothy)"

Or this:

bash -ilc "export DOROTHY_XDG=yes; $(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/setup-dorothy)"

from dorothy.

molleweide avatar molleweide commented on May 25, 2024

Aah allright, i sidn't know what terminology to use.

from dorothy.

molleweide avatar molleweide commented on May 25, 2024

oooh what is dorothy edit suppose to do?

okay so I conclude you don't think the user should have an XDG bool in their environment.bash or similar, ie. XDG is only based on what dirs exist and their locations. and one specifies these locations in dorothy setup. I am just rephrasing to make sure I follow. Because I want to be super sure I am following you before I go off doing stupid shit haha.

  1. dorothy setup prompts for XDG yes/no.
  2. environmnet paths are being set based on this, ie. home/dorothy -> NO XDG || config/dorothy -> YES XDG.

we don't explicitly set environmnet variable DOROTHY_XDG. Are there downsides with this I am not aware of?

from dorothy.

balupton avatar balupton commented on May 25, 2024

I'm tackling the setup changes now, will leave the setup-environment-commands stuff for you

from dorothy.

molleweide avatar molleweide commented on May 25, 2024

Perfect

from dorothy.

balupton avatar balupton commented on May 25, 2024

Completed via #105 and #94

from dorothy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.