문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
linux:grive2 [2019/11/28 08:57] kwon37xi [사용] |
linux:grive2 [2022/07/19 16:38] (현재) kwon37xi [Debian Build Package] |
||
|---|---|---|---|
| 줄 6: | 줄 6: | ||
| * [[http:// | * [[http:// | ||
| - | ===== PPA 설치 ===== | + | ===== pacstall |
| <code sh> | <code sh> | ||
| - | sudo add-apt-repository ppa: | + | pacstall |
| - | sudo apt-get update | + | |
| - | sudo apt-get install grive | + | |
| </ | </ | ||
| + | |||
| ===== Debian Build Package ===== | ===== Debian Build Package ===== | ||
| 줄 20: | 줄 19: | ||
| libyajl-dev libboost-all-dev libcurl4-openssl-dev libexpat1-dev \ | libyajl-dev libboost-all-dev libcurl4-openssl-dev libexpat1-dev \ | ||
| libcppunit-dev binutils-dev debhelper zlib1g-dev dpkg-dev \ | libcppunit-dev binutils-dev debhelper zlib1g-dev dpkg-dev \ | ||
| - | pkg-config libstdc++-7-dev | + | pkg-config |
| + | # 특히 libstdc++-9-dev 주의! 문서에는 안나오는 의존성임. 또한 Ubuntu 22.04 이전 버전에서는 '' | ||
| + | |||
| + | cd /tmp | ||
| + | git clone https:// | ||
| # 소스 압축푼 디렉토리로 이동(ext 파티션이어야 한다) | # 소스 압축푼 디렉토리로 이동(ext 파티션이어야 한다) | ||
| + | cd grive2 | ||
| + | |||
| dpkg-buildpackage -j4 | dpkg-buildpackage -j4 | ||
| # 상위디렉토리에 deb 패키지 생성됨 | # 상위디렉토리에 deb 패키지 생성됨 | ||
| sudo dpkg -i < | sudo dpkg -i < | ||
| + | |||
| + | # 마지막에 오류 발생하는 것은 무시 | ||
| + | dpkg-buildpackage: | ||
| + | | ||
| + | gpg: skipped " | ||
| + | gpg: dpkg-sign.v7YLDLyX/ | ||
| + | |||
| + | dpkg-buildpackage: | ||
| + | |||
| </ | </ | ||
| 줄 33: | 줄 47: | ||
| * https:// | * https:// | ||
| - | 1 - Go to https:// | + | |
| - | 2 - Search for Google Drive API and enable it. | + | - Search for Google Drive API and enable it. |
| - | 3 - Go to API Credentials page (https:// | + | - Go to API Credentials page (https:// |
| - | 3 - Create a new OAuth Client credential. You will be provided with a id and a secret. Save both because you gonna need it for grive2. | + | - Create a new OAuth Client credential. You will be provided with a id and a secret. Save both because you gonna need it for grive2. |
| - | + | | |
| - | Then you need to follow this repo README, download grive2, build and install. Then run | + | |
| + | <code sh> | ||
| grive -a --id [client id] --secret [client secret] | grive -a --id [client id] --secret [client secret] | ||
| - | + | # id 는 긴코드값.apps.googleusercontent.com | |
| - | On your Drive folder and it will probably work. | + | |
| - | + | ||
| - | If you want to use your ID and secret to build grive2 instead of using above command, you can edit the keys in | + | |
| - | + | ||
| - | grive2/ | + | |
| - | + | ||
| - | Lines 49 to 50 in 3929909 | + | |
| - | <code c> | + | |
| - | const std::string default_id | + | |
| - | const std::string default_secret | + | |
| </ | </ | ||
| + | |||
| ===== 사용 ===== | ===== 사용 ===== | ||
| 줄 68: | 줄 73: | ||
| # 혹은 | # 혹은 | ||
| grive -p / | grive -p / | ||
| - | </ | ||
| - | * 지속적 동기화 <code sh> | ||
| - | # / | ||
| - | 15,45 * * * * / | ||
| </ | </ | ||
| 줄 81: | 줄 82: | ||
| * **NTFS 파티션**에서 오류가 발생했다. [[linux: | * **NTFS 파티션**에서 오류가 발생했다. [[linux: | ||
| + | ===== 동기화 ===== | ||
| + | * [[linux: | ||
| + | * 하나의 구글 드라이브에 대해서 둘 중의 하나만 적용해야 한다. | ||
| + | * 아래 예에서 '' | ||
| + | |||
| + | ==== time based ==== | ||
| + | <code sh> | ||
| + | systemctl --user enable grive-timer@$(systemd-escape google-drive).timer | ||
| + | systemctl --user start grive-timer@$(systemd-escape google-drive).timer | ||
| + | </ | ||
| + | |||
| + | ==== change based ==== | ||
| + | * '' | ||
| + | |||
| + | <code sh> | ||
| + | systemctl --user enable grive-changes@$(systemd-escape google-drive).service | ||
| + | systemctl --user start grive-changes@$(systemd-escape google-drive).service | ||
| + | </ | ||
| + | |||
| + | ==== log ==== | ||
| + | <code sh> | ||
| + | journalctl -f --user-unit=grive-timer@$(systemd-escape google-drive).timer | ||
| + | journalctl -f --user-unit=grive-changes@$(systemd-escape google-drive).service | ||
| + | </ | ||
| + | * 만약 systemd 서비스가 작동하지 않는다면 '' | ||
| + | * ''/ | ||
| + | * 현재 해당 파일이 ''/ | ||
| + | * pacstall로 설치시에는 ''/ | ||
| + | |||
| + | <code sh> | ||
| + | cd / | ||
| + | sudo mkdir -p / | ||
| + | cd / | ||
| + | sudo ln -s / | ||
| + | </ | ||