Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full rewrite #185

Merged
merged 8 commits into from
Jul 14, 2022
Merged

Full rewrite #185

merged 8 commits into from
Jul 14, 2022

Conversation

Akianonymus
Copy link
Collaborator

@Akianonymus Akianonymus commented May 15, 2022

flags: Add more documentation

[FEATURE] Support for sub-folders with --create-dir flag. | Resolve #155

install.sh: Do not fail if username is in small case

[SKIP-CI] Fix some shellcheck warinings

Use grep for -ex and -in flag | Resolve #176

Full rewrite

use a improved argument parser

add a -- flag, to treat all input as file or folder or drive id input

stop using set -e anywhere

add a improved config parser

fix all edgecases in authentication

commonize more code as possible

move update code to update.sh

do not edit zshrc or bashrc with the install script, instead show a help text on what to add to the zshrc or bashrc

move all files to src folder and release scripts in release folder

fix all shellcheck warnings

resolve #174 #176

use a improved argument parser

add a -- flag, to treat all input as file or folder or drive id input

stop using set -e anywhere

add a improved config parser

fix all edgecases in authentication

commonize more code as possible

move update code to update.sh

do not edit zshrc or bashrc with the install script, instead show a help text on what to add to the zshrc or bashrc

move all files to src folder and release scripts in release folder

fix all shellcheck warnings

resolve labbots#174 labbots#176
@Akianonymus
Copy link
Collaborator Author

@labbots This is ready to merge. Github actions is failing because a new release has not been created.

labbots
labbots previously approved these changes May 23, 2022
@JorgeLNJunior
Copy link

I'm getting this error when trying to install.

curl --compressed -Ls https://github.com/Akianonymus/google-drive-upload/raw/master/install.sh | sh -s
---------------------------------------------------------------[ Installing google-drive-upload.. ]----------------------------------------------------------------
---------------------------------------------------------------------[ Downloading scripts.. ]---------------------------------------------------------------------
----------------------------------------------------------------------------[ gupload ]----------------------------------------------------------------------------
bash: line 7: syntax error near unexpected token `newline'
Script downloaded but malformed, try again and if the issue persists open an issue on github.

@Akianonymus Akianonymus linked an issue Jul 14, 2022 that may be closed by this pull request
@Akianonymus
Copy link
Collaborator Author

I'm getting this error when trying to install.

curl --compressed -Ls https://github.com/Akianonymus/google-drive-upload/raw/master/install.sh | sh -s
---------------------------------------------------------------[ Installing google-drive-upload.. ]----------------------------------------------------------------
---------------------------------------------------------------------[ Downloading scripts.. ]---------------------------------------------------------------------
----------------------------------------------------------------------------[ gupload ]----------------------------------------------------------------------------
bash: line 7: syntax error near unexpected token `newline'
Script downloaded but malformed, try again and if the issue persists open an issue on github.

Will be fixed after a new release has been created.

@Akianonymus
Copy link
Collaborator Author

@labbots Approve again.

…ix labbots#183

It will use either netcat or python3 to start the http server

Now no need to copy paste the authorizaton ccode manually

https://developers.google.com/identity/protocols/oauth2/native-app#create-code-challenge
@Akianonymus Akianonymus merged commit e73d741 into labbots:master Jul 14, 2022
@mdawart
Copy link

mdawart commented Jul 16, 2022

After updating to the new version, I always get an error

michael@MacBook-Pro-von-Michael ~ % gupload --info
bash: _check_refresh_token: line 57: syntax error near unexpected token `&'
bash: _check_refresh_token: line 57: ` & _tmp_server_pid="$!";'
bash: error importing function definition for `_check_refresh_token'
REPO: labbots/google-drive-upload
INSTALL_PATH: /Users/michael/.google-drive-upload/bin
INSTALLATION: sh
TYPE: release
TYPE_VALUE: latest
LATEST_INSTALLED_SHA: e73d741c5480cd71edceeea54fa9b1d9374ebc45

I also tried to uninstall / reinstall but same result :-(

@Akianonymus
Copy link
Collaborator Author

That is a very weird error. You are on mac os, right ? Assuming your bash version is less than 4 and posix script was installed but it is trying to run the script with bash.

can you upload you gupload binary file and send me ? also, try upgrading your bash and reinstall again.

@mdawart
Copy link

mdawart commented Jul 16, 2022

bin.tar.gz

checking my bash version

michael@MacBook-Pro-von-Michael ~ % bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.

when I run the uninstaller, I got this output

[ Uninstalling.. ]
chmod: --: No such file or directory
[  Remove below line from your shell rc manually  ]

[  Shell rc: /Users/michael/.zshrc  ]

[ -f "${HOME}/.google-drive-upload/bin/gupload" ] && [ -x "${HOME}/.google-drive-upload/bin" ] && PATH="${HOME}/.google-drive-upload/bin:${PATH}"

[ Uninstall complete. ]

needed to removed the .google-drive-upload manually and removed the addition from /Users/michael/.zshrc manually as described.

Reinstalled using the script, same error.

Will search now on how to upgrade the bash...

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants