Add cleanup script (for developers) (Fix #124)
This commit is contained in:
19
bin/cleanup.js
Executable file
19
bin/cleanup.js
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Remove all traces of WebTorrent.app from the system (config and temp files).
|
||||
* Useful for developers.
|
||||
*/
|
||||
|
||||
var applicationConfigPath = require('application-config-path')
|
||||
var config = require('../config')
|
||||
var os = require('os')
|
||||
var path = require('path')
|
||||
var pathExists = require('path-exists')
|
||||
var rimraf = require('rimraf')
|
||||
|
||||
var tmpPath = path.join(pathExists.sync('/tmp') ? '/tmp' : os.tmpDir(), 'webtorrent')
|
||||
var configPath = applicationConfigPath(config.APP_NAME)
|
||||
|
||||
rimraf.sync(configPath)
|
||||
rimraf.sync(tmpPath)
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Update AUTHORS.md based on git history.
|
||||
|
||||
git log --reverse --format='%aN <%aE>' | perl -we '
|
||||
|
||||
Reference in New Issue
Block a user